-
Notifications
You must be signed in to change notification settings - Fork 13
Need of the Buffer
abstraction
#10
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 don't need a separate module for an interface that We had a discussion with some members of our team around this and a point @rstoyanchev brought up is a good one: if we're building a generic and reusable core, then our intention is that people not use the Netty API directly. Otherwise why abstract it at all and why go to the trouble of splitting anything up? If we're not going to have common and reusable functionality in any of these other components, then this project itself has no purpose. You can easily create an RS implementation right on top of Netty and simply expose the RS interfaces instead of the Netty ones. There is no need for other modules and other levels of abstraction if that's the case. IMO we should not assume that all codecs are configured on the Netty pipeline and that the message being passed to the RS pipeline is one of the output type by the Netty codec and not the "lowest common denominator". This would immediately preclude the use of any implementation other than Netty unless it also provided its own, proprietary way of doing the common task of requesting that a chunk of bytes (which it would never access directly since it would get that through the Again we're back to the issue of: why bother with this exercise at all if we aren't going to abstract any of this "common" functionality away from Netty? It can't really be all that common if we are depending on Netty itself to do every bit of heavy lifting, from dispatching signals to decoding data. |
@jbrisbin mentions the intention of this abstraction here as follows:
I am unclear about why would we have to provide data encoding/decoding via a common interface agnostic of networking libraries. I would imagine the codecs naturally fitting with a networking library interface and general length-field-based codecs are already available with netty.
Currently, this
Buffer
is a part of theConnection
as:This means that everything read from a connection is always wrapped in this
Buffer
. Is this a valid contract? IMO it is too opinionated.The text was updated successfully, but these errors were encountered: