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

Websocket batch processing / read completion event #5178

Open
phraktle opened this issue Apr 3, 2024 · 3 comments
Open

Websocket batch processing / read completion event #5178

phraktle opened this issue Apr 3, 2024 · 3 comments
Milestone

Comments

@phraktle
Copy link

phraktle commented Apr 3, 2024

Describe the feature

Facilitate processing multiple available messages from a websocket in a batch. A possible solution is to provide a read completion event which indicates that all currently available messages from the network buffer were consumed.

Use cases

This allows improving latency in high-load / bursty consumers. For example, when consuming a real-time API with batch processing the consumer may skip messages to act only on the latest one in case of a burst / hiccup, effectively shedding load without introducing additional latency.

Contribution

Since the design has to consider feature interactions, such as back-pressure, I would request a core developer to look into this. Happy to provide support with review and testing.

@vietj vietj added this to the 5.0.0 milestone Apr 3, 2024
@kovax
Copy link

kovax commented Apr 4, 2024

I guess this could be available to any socket/streams.

@vietj
Copy link
Member

vietj commented Apr 4, 2024

@kovax that's right

@vietj
Copy link
Member

vietj commented Apr 4, 2024

I think the major work is define how that works with back-pressure pause/fetch/resume overall in a consistent manner

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

3 participants