Replies: 1 comment 4 replies
-
Hi! I think it's a great idea to introduce batching into subscriptions! The incremental wrapper within the payload helps with batching, but also serves the purpose of Separating the incremental results portion from the initial result. In subscriptions, since we do not have that requirement of separation (yet) could we not simply send an array of results? I think that will eventually help us if we want to introduce incremental results into subscriptions again. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey folks; I was reflecting on the recent payload structural changes, specifically the
incremental
field allowing multiple payloads, and was wondering if this may also be useful for subscriptions. As we know, streaming events to the client one at a time and having them parse and process each one individually can lead to client thrashing; the same can happen over subscriptions. So I'm wondering if the server might take a number of the subscription payloads and pop them together into a batch.Imagining subscribing to a stock market ticker (
subscription { stockChange { stock value time } }
) with a sudden flurry of activity:This could, should the server choose, instead be delivered via batch at a rate of 10 times per second (or respecting backpressure, or whatever it chooses really):
Of course these aren't really "incremental" results. So really, my question is... Is there a better term that allows for more utilisation of this batching capability in future?
Beta Was this translation helpful? Give feedback.
All reactions