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

Provide periodic detection updating of the ipfs daemon's running status from the replay web UI #81

Open
machawk1 opened this issue Jan 9, 2017 · 6 comments

Comments

@machawk1
Copy link
Member

machawk1 commented Jan 9, 2017

No description provided.

@ibnesayeed
Copy link
Member

ibnesayeed commented Jan 9, 2017

For things like this we can use SSE to update the number of captures, progress of indexing, status of the IPFS daemon and whatnot on the client side. No need to poll.

@machawk1
Copy link
Member Author

machawk1 commented Jan 9, 2017

@ibnesayeed I would prefer to make this feature as light as possible initially on our end. We don't control the response from the ipfs daemon's HTTP API. The idea is to solely get the status of the daemon with this ticket then maybe more information about the node once we are confident of ipwb replay to ipfs daemon communication.

@ibnesayeed
Copy link
Member

I am not suggesting to talk to the IPFS daemon from the client/browser. Our IPWB server should detect and keep the state info somewhere and tell the client using SSE when necessary. The only thing I am suggesting here to change is not to use periodic polling, but let the server tell the client instead.

@machawk1
Copy link
Member Author

machawk1 commented Jan 9, 2017

Ah, ok, so (ipwb replay web ui)←SSE→(ipwb replay backend)↔(ipfs daemon)?

@ibnesayeed
Copy link
Member

SSE is not a separate animal. The client (web UI) connects to the backend (IPWB server) and starts listening on a channel. Each time the backend finds something worth telling the client, it simply emits an event data on that channel which can then be received by the client and acted upon (update pieces of information on the page). After the initial connection, it is a one-way communication, that is why it is called a Server Sent Event.

@machawk1
Copy link
Member Author

machawk1 commented Jan 9, 2017

SSE is not a separate animal

@ibnesayeed I am aware of this. I meant to convey communication via SSE, not that SSE was an entity in itself. Thanks for the suggestions.

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