1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00
phorge-phorge/support/aphlict/server/lib
epriestley ebcab8edb6 Namespace Aphlict clients by request path, plus other fixes
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.

Reviewers: joshuaspence, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7041, T7012, T7130

Differential Revision: https://secure.phabricator.com/D11769
2015-02-16 11:31:15 -08:00
..
AphlictAdminServer.js Namespace Aphlict clients by request path, plus other fixes 2015-02-16 11:31:15 -08:00
AphlictClientServer.js Namespace Aphlict clients by request path, plus other fixes 2015-02-16 11:31:15 -08:00
AphlictListener.js Namespace Aphlict clients by request path, plus other fixes 2015-02-16 11:31:15 -08:00
AphlictListenerList.js Namespace Aphlict clients by request path, plus other fixes 2015-02-16 11:31:15 -08:00
AphlictLog.js Enable "strict" mode for NodeJS 2015-01-20 07:43:10 +11:00
javelin.js Make the Aphlict server more resilient. 2014-06-11 10:17:12 -07:00