You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering if there is merit in adding an option to use SSE for subscription updates ?
Why is this needed:
Partly because I am having problems with web sockets and so reaching out to see if SSE would be better. It’s a far simpler protocol .
I am also curious how the backend manages what users are subscribed to what . Is this able to be inspected somehow or even better to have that data available as a change stream over SSE.
The text was updated successfully, but these errors were encountered:
I'm not familiar with SEE can you share some links? The backend groups (with sharding) subscriptions to a single query together (each subscriber can have different variables) into a single query execution and then polls for changes using this. If any unified response has updates then the subscribers who those updates are for are sent the updated result.
For example if 10K folks subscribe to a query for new blog posts and each of them has a different list of followers then this will result to about 20 queries to the db for every polling instance. In short as efficient as can be and designed to be horizontally scaleable and use the most efficient DB interface SQL itself.
it’s built into browsers and there are golang ( and other libs ) for non browsers.
it’s quite a simple protocol.
This all came up for me because I was looking to decouple the subscription events transport from graphjin. For example I could stick the events into anything durable like a message queue and then push them out over SSE or a thing really. It’s basically a decoupling of the Transport for the Subscriptions. Sone people might even want to send a web hook to another server for example.
Thank you for the explanation of the Logic of how the system manages subscription. It’s an awesome design.
I am trying to come to grips with the client-side . A golang graphql package that works with graphjin subscription would be nice if you know of one. I could then experiment from the terminal with a minimal golang cli so I can experiment.
anyways looking forward to your thoughts.
gedw99
changed the title
SSE based push ?
Subscription transports
Dec 29, 2022
What would you like to be added:
I am wondering if there is merit in adding an option to use SSE for subscription updates ?
Why is this needed:
Partly because I am having problems with web sockets and so reaching out to see if SSE would be better. It’s a far simpler protocol .
I am also curious how the backend manages what users are subscribed to what . Is this able to be inspected somehow or even better to have that data available as a change stream over SSE.
The text was updated successfully, but these errors were encountered: