-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Implement websockets #4797
Comments
@FelixMalfait SSE are great for unidirectional communication. But making it bidirectional has its own benefit. As this application is gonna be enterprise grade tackling numerous use-cases, I think decision to go with WS is gonna be scalable. The issue looks cool and complex at same time. I would love to work on this from the very start. Wish me good luck, I'm starting on this. Will be reaching out to you in case of queries. |
@i-am-chitti great! fyi I changed the structure of the Events object a bit and renamed it to AuditLog in this PR which hasn't been merged yet: #4936 I also think it's a cool and interesting issue, never implemented WS myself and curious to see how it plays out! |
Feel free to DM me on Discord if you need help @i-am-chitti |
@FelixMalfait, What do you mean by this?
Like on getting event streams from Websockets on frontend, I should only do a console.log, right? Then, what's the DB referred to here? |
@i-am-chitti I meant that as a first step we could just console.log the events received from the backend and not to the work of injecting them in the apollo cache (that can be in another issue/pr) The events that are sent to the frontend are also logged in the database (in the "AuditLog" table in my new PR, in Events table currently) |
This is the first step towards a really cool feature: real-time sync.
The goal is to have a real-time multi-players experience soon.
Building a first version shouldn't be too complex as the project is already built upon strong foundations (Apollo on frontend, events already implemented on the backend, etc.)
We will break down this work into multiple issues to review PRs step by step
Here are the steps for this first issue to do a proof of concept.
Steps:
Note: I was initially in favor of implementing SSE instead of WS but changed my mind again.
Because we might have a use-case for bi-directionnal communication as some point (possible it seems), for exemple moving the track() analytics endpoint called by frontend on every pageview (in the future we'll be displaying who's viewing the same page "live" and their status, like on Google Docs)
The text was updated successfully, but these errors were encountered: