Skip to content
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

Open
pilwon opened this issue Aug 20, 2014 · 9 comments
Open

nsqadmin: update in real-time #443

pilwon opened this issue Aug 20, 2014 · 9 comments

Comments

@pilwon
Copy link
Contributor

pilwon commented Aug 20, 2014

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.

@mreiferson mreiferson added this to the nsqadmin refactoring milestone Aug 20, 2014
@mreiferson mreiferson changed the title [nsqadmin] Update numbers in real-time via websocket nsqadmin: update in real-time via websocket Aug 20, 2014
@paddycarver
Copy link
Contributor

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.

@mreiferson mreiferson changed the title nsqadmin: update in real-time via websocket nsqadmin: update in real-time Aug 25, 2014
@mreiferson
Copy link
Member

updated title :)

@paddycarver
Copy link
Contributor

They also are easier to operate. No worrying about reconnect logic, they mostly "just work" for streaming updates.

@jamesfzhang
Copy link

👍

1 similar comment
@zygis
Copy link

zygis commented Oct 8, 2014

+1

@stephens2424
Copy link

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?

@mreiferson
Copy link
Member

I would say whichever is simpler to implement - I'm not terribly concerned about IE compatibility, for example.

@paddycarver
Copy link
Contributor

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.

@allgeek
Copy link

allgeek commented Nov 8, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants