You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a suggestion, not critical at all but potentially useful, and perhaps not difficult to implement (I would have gone with a PR already, but I'm less familiar with websockets in python and time is scarce):
Have the server report:
asynchronously, that is, via websocket event (as any other, but with some special metadata_ prefix or something for the name of the event):
A new client has connected
A client has disconnected
synchronously, that is, via regular http request:
number of currently connected clients
I have functionality like the above for the Dash, and this has been very useful specially for monitoring performance, see actual use of the system at any given moment, and the like.
The text was updated successfully, but these errors were encountered:
I've added a rudimentary HTTP server alongside the WebSocket server. See the http-server branch if you want to give it a spin -- it runs on 1 + the specified port and just returns a JSON blob with the number of connected clients for a GET request on any path. I also reworked logging a tiny bit so you can change verbosity from the command line.
asynchronously, that is, via websocket event (as any other, but with some special metadata_ prefix or something for the name of the event):
I'm hesitant to implement the async reporting of clients connecting/disconnecting as it would muddy the schema a bit (clients would need to know about this special case). Maybe a separate endpoint for this to opt-in would suffice, but I need to think about this more (time is also scarce on my end).
Hi @kevinsbarnard
Just a suggestion, not critical at all but potentially useful, and perhaps not difficult to implement (I would have gone with a PR already, but I'm less familiar with websockets in python and time is scarce):
Have the server report:
asynchronously, that is, via websocket event (as any other, but with some special
metadata_
prefix or something for the name of the event):synchronously, that is, via regular http request:
I have functionality like the above for the Dash, and this has been very useful specially for monitoring performance, see actual use of the system at any given moment, and the like.
The text was updated successfully, but these errors were encountered: