-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
nsqadmin: update in real-time #443
Comments
Chiming in here quick: websockets are unnecessary for this, as you don't need two way communication. Just use Server Sent Events. They're trivial to implement in Go. |
updated title :) |
They also are easier to operate. No worrying about reconnect logic, they mostly "just work" for streaming updates. |
👍 |
1 similar comment
+1 |
Websockets have marginally more support across browsers (latest IE versions being the notable one missing from Server Sent Events). http://caniuse.com/#search=server vs http://caniuse.com/#search=websocket Does anybody have any significant opinion on which to use, with that in mind? |
I would say whichever is simpler to implement - I'm not terribly concerned about IE compatibility, for example. |
I'd say SSE--implementing it in Go is trivial, the client-side code is simpler (no need to manage connection state, etc.) and the main advantage of WS (the client can talk to the server) isn't something nsqadmin actually needs. |
It's less elegant than a full SSE implementation, but as part of #323 it should be trivial to implement an automatic refresh on a configurable timer, with the client re-polling for new data over the nsqadmind REST endpoints. I think SSE should be tackled in a separate commit for this issue after that initial refactoring, but welcome input in #323 if there are any suggestions/concerns with that sort of interim solution. |
It'd be great if we could see the numbers in
nsqadmin
(ex: Depth, Memory + Disk, Messages, Channels, etc.) updated in real-time via websocket.The text was updated successfully, but these errors were encountered: