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

Server-Sent-Events #8

Open
dtq-two opened this issue May 19, 2022 · 0 comments
Open

Server-Sent-Events #8

dtq-two opened this issue May 19, 2022 · 0 comments
Assignees
Labels
help wanted Extra attention is needed
Milestone

Comments

@dtq-two
Copy link

dtq-two commented May 19, 2022

Problem

Currently the frontend fetches all groups, nodes, devices and messages in a fixed interval. This results in unnecessary requests when nothing is changing and a lag when a lot is changing. Server-Sent-Events seem like a fitting solution to this problem

Idea

  • Send an Event whenever a new message was handled that contains the new necessary informations:

NBIRTH

  • The new node object
  • The new node metrics
  • node devices are not necessary, because they are not changing

NDEATH

  • The new node object
  • node devices and node metrics are not necessary, because they are not changing except from becoming offline/stale

NDATA

  • The new node object
  • The new node metrics

DBIRTH

  • The new node object (because of seq number)
  • The new device object
  • The new device metrics

DDEATH

  • The new node object (because of seq number)
  • device and device metrics are not necessary, because they are only becoming offline/stale

DDATA

  • The new node object (because of seq number)
  • The new device metrics

Open issues

Currently, we utilize Tabulator with React-Tabulator to update views in the browser once SSE are received. However, due to some changes it does not seem to be possible anymore to use React functional components. A work-around seems to be to use React class components instead.

@dtq-one dtq-one added the help wanted Extra attention is needed label May 30, 2022
@dtq-one dtq-one added this to the m1 milestone May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants