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

make the web ui event-aware #226

Closed
tarekziade opened this issue Jul 16, 2012 · 3 comments
Closed

make the web ui event-aware #226

tarekziade opened this issue Jul 16, 2012 · 3 comments

Comments

@tarekziade
Copy link
Member

We want the web ui to react live on changes made through circusctl

For instance, removing or adding a worker should be reflected on the UI w/o having to reload

@almet
Copy link
Contributor

almet commented Jul 16, 2012

This makes me think that we should probably add some more book-keeping features in the circus http deamon, rather than letting the clients manage a number of things.

Into other things, this would allow multiple clients to always have the same interface always up to date with the change that had been done on the other nodes, without explicitely having to update their web page.

I've been thinking a bit and it seems that the following scheme would allow us to be efficient:


Cicusd ←→ Pub/Sub channel  →  CircusHTTPd [state of the system]
                                            ↓      ↓      ↓     (web-socket)
                                  clients  #1      #2     #3

This looks a lot like what we have ATM, but we don't really use the fact that we have a state that can be shared between sockets. That is, we don't store stats information into this state for instance, and we reconstruct it each time for each client.

I think this relates to #225: we could only open a zmq socket between circus-stats and circus-httpd and use a socketio objects that would observe the changes happening on the watchers/processes they're interested in.

@tarekziade
Copy link
Member Author

No sure what you mean. Adding something in cache that's shared by all clients ? or changing how things work ? can you give an example of a session ?

@almet
Copy link
Contributor

almet commented Jul 16, 2012

Mainly, I meant adding more things into a cache that's shared between all the circus httpd clients. In term of what we put into the session, it's important to understand that this is not an http session, but rather a cache on the server side (and doesn't depend on a client session).

After some chatting it seems something we don't really care about, as we don't have that many clients at the same time, letting them getting the information from the pub/sub sounds enough for now.

So this all boils down to:

  • "add a way to send events to the clients when the pub/sub tells so"
  • "don't open a connection to the pub/sub for each client, but only one per http server and proxy the info to all the clients"
  • "store some information about the stats in the server rather than always streaming everything from scratch" (but this one is a different issue)

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

2 participants