-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client connection tracking #155
Comments
Solution suggestion - Connection eventsScope consideration 1Extending the RES protocol with two new events, published by Resgate:
Scope consideration 2Adding two new system events for resgate start and stop, a service could act upon them by assuming all previously established connections for that Resgate instance are to be considered disconnected:
This would not cover the case when a Resgate failed to send the Scope consideration 3A system request, listened to by all gateways, would allow a restarted service to get a current list of connected clients from all resgate instances.
|
@jirenius why don't you add the token information on Scope consideration 1? That would make it easier for the application to identify which user is associated with the connection. Otherwise a explicit call to Scope 3 would be needed. |
On connect, the token is always null. Resgate does not store state between reconnects, and has no concept of sessions. It is ResClient's task to rebuild state after a reconnect. But you don't have to call "Scope3", but instead just listen for the On a disconnect/reconnect, this is what takes place:
All above is done by ResClient automatically, so that the app doesn't have to bother. |
@jirenius when will this be implemented? |
Issue
Services want to be able to track which clients are currently connected to any of the Resgates.
Scope
This feature should consider the following:
Notes
The tracking of client connections should only be done for WebSocket connections, and not HTTP requests. The short-lived connection created for HTTP requests would only produce unnecessary traffic of limited use.
The text was updated successfully, but these errors were encountered: