-
Notifications
You must be signed in to change notification settings - Fork 13
Read backpressure #28
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
Comments
We've experimented with basic read back-pressure support #33. To start simple, we set The presence of codecs can change things. We took a couple of examples #32 with a line-based splitting decoder and a JSON decoder (which we copied from Netty 4.1). Both of these extend ByteToMessageDecoder that lets sub-classes decode the input message and add one or more Objects to a list, and then in channelReadComplete fires another read if In effect, when TcpConnectionImpl issues 1 read, codecs will keep calling channel.read() as long as necessary to decode at least 1 Object. It also means that when TcpConnectionImpl issues 1 read, more than one objects may result. For example with the line-based codec:
For now we've added an Given this proposal, simple as it may be, do we need anything more in TcpConnectionImpl? Regarding the key considerations in the original comment, we thought that further upstream, incoming messages can be aggregated or split as necessary rather than building that into TcpConnectionImpl. It's something we'll try to demonstrate next. |
This is a dual of issue #25 which deals with write backpressure. It also depends on issue #27 which determines what gets written on a connection.
Key considerations
n
items, how does it convert to the number of bytes read on the channel?The text was updated successfully, but these errors were encountered: