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

Realtime #44

Open
dbrgn opened this issue Mar 25, 2018 · 2 comments
Open

Realtime #44

dbrgn opened this issue Mar 25, 2018 · 2 comments

Comments

@dbrgn
Copy link
Contributor

dbrgn commented Mar 25, 2018

How complicated would it be to add realtime support?

It would be great if we could subscribe to new measurements (for all sensors), for example over a WebSocket. (SSE would be another option, but it's far less well supported than WebSockets.)

@schmijos
Copy link
Contributor

schmijos commented May 1, 2019

Cool idea. Should be easy with ActionCable.

@dbrgn
Copy link
Contributor Author

dbrgn commented May 2, 2019

Ok, let's do some speccing:

  • Application fetches initial state (sensors + historic data)
  • Application subscribes to a WebSocket endpoint
  • Every time a new measurement arrives, that data is pushed as a "measurement" event to all subscribers
  • The subscribers receive the update and add it to the currently displayed data.

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