Page MenuHomePhabricator

Namespace Aphlict clients by request path, plus other fixes
ClosedPublic

Authored by epriestley on Feb 15 2015, 12:27 AM.
Tags
None
Referenced Files
F13088692: D11769.diff
Thu, Apr 25, 1:31 AM
Unknown Object (File)
Thu, Apr 11, 9:04 AM
Unknown Object (File)
Thu, Apr 11, 4:11 AM
Unknown Object (File)
Mon, Apr 1, 11:19 AM
Unknown Object (File)
Thu, Mar 28, 12:13 PM
Unknown Object (File)
Mar 24 2024, 1:47 AM
Unknown Object (File)
Mar 24 2024, 12:28 AM
Unknown Object (File)
Mar 10 2024, 11:52 AM
Subscribers
Tokens
"Mountain of Wealth" token, awarded by btrahan.

Details

Summary

Fixes T7130. Fixes T7041. Fixes T7012.

Major change here is partitioning clients. In the Phacility cluster, being able to get a huge pile of instances on a single server -- without needing to run a process per instance -- is desirable.

To accomplish this, just bucket clients by the path they connect with. This will let us set client URIs to /instancename/ and then route connections to a small set of servers. This degrades cleanly in the common case and has no effect on installs which don't do instancing.

Also fix two unrelated issues:

  • Fix the timeouts, which were incorrectly initializing in open() (which is called during reconnect, causing them to reset every time). Instead, initialize in the constructor. Cap timeout at 5 minutes.
  • Probably fix subscriptions, which were using a property with an object definition. Since this is by-ref, all concrete instances of the object share the same property, so all users would be subscribed to everything. Probably.
Test Plan
  • Hit notification status page, saw version bump and instance/path name.
  • Saw instance/path name in client and server logs.
  • Stopped server, saw reconnects after 2, 4, 16, ... seconds.
  • Sent test notification; received test notification.
  • Didn't explicitly test the subscription thing but it should be obvious by looking at /notification/status/ shortly after a push.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Namespace Aphlict clients by request path, plus other fixes.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, joshuaspence.
support/aphlict/server/lib/AphlictListener.js
10

...this creates a new object for each one, instead.

14

Specifically, this is the subscriptions fix. As written, all concrete instances of AphlictListener share this object.

webroot/rsrc/externals/javelin/lib/WebSocket.js
73

This is the timeout fix.

btrahan edited edge metadata.
This revision is now accepted and ready to land.Feb 16 2015, 7:21 PM
This revision was automatically updated to reflect the committed changes.