-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Jetty 12 - Review Jetty WebSocket API batching #9723
Comments
@gregw @joakime @lachlan-roberts thoughts? |
I'm not a huge fan of features that don't have known use-case, as it is hard to get it right unless there is something using it. I think that if we do add a mechanism, not calling it batching may help describe it. Perhaps call it autoFlush, or lazyFlush? Or maybe we just provide a gather send? but my preference is to wait until somebody needs it. |
Agreed, closing for now. |
In Jetty 9 I used the following annotation:
With respect to batching, does this concept still exist? Or is it not something I need to be concerned with? |
@brettwooldridge can you explain why do you use that feature? What you think it does? |
My understanding, which could be mistaken, is that if batch mode was enabled in Jetty 9, that write operations performed on the websocket could result in bytes not being flushed until a threshold number of bytes has been reached, rather than immediately. This appears to be embodied in this code: Line 193 in 86586df
Because the code in question was implemented some 7 years ago, I cannot recall whether we encountered a demonstrable issue or whether it was merely a concern of a developer. Because the websocket is used for realtime event notification, the issue or concern is that event delivery might be delayed by batching behavior. |
@brettwooldridge the batching of frames is still a concept in Jettys lower level websocket-core API. But there is just no configuration for it in the new jetty-websocket-api, it is always off and there is no option to enable it. So you will not need this batchMode configuration anymore as it is always off. |
Jetty version(s)
12+
Enhancement Description
After #9552, the batching in sends is hardcoded to disabled.
Is it worth to reintroduce it in the API?
There can be 3 proposals:
Proposal 2 & 3 are easier to deprecate if turns out to be a not so good idea, because we only deprecate 1 method rather than 4.
The text was updated successfully, but these errors were encountered: