-
Notifications
You must be signed in to change notification settings - Fork 915
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
[Poll] Shading Netty #1168
Comments
/cc @anuraaga @arkadius @imasahiro @rkapsi @taicki and anyone interested |
I voted to all three options so that the voters can cast conveniently. I'll cast/uncast mine when I close the poll. |
Thanks for setting up the poll :) Out of curiosity, do you expect a performance impact from the abstraction? I guess it will mostly inline and be minimal and want to confirm with your feeling. Also, since |
I think there will be performance impact if we replace
That would fall into the option (2) - shading Netty partially, in this case 'everything except |
To give a bit context for my selfish vote. Our application is a Netty application (an Software Edge LB). Many years ago we managed the lifecycle of that application ourselves. But then a need for internal APIs (think dashboards) emerged and we didn't want to build these higher level abstractions on Netty. The Servlet API and Jersey (v1) are kind of nice for that stuff. So we started to embed our Netty application into a Servlet Container. Initially Jetty Embedded, then Dropwizard, Spring Boot. Our That is all great but we'd like to make a leap and start looking into topics such as This is where Armeria comes into play. It has the nice high level abstractions but is also built on Netty and we can leverage all that goodness across our application. In that respect unshaded+access to all underlying guts would work best for us and we have no expectation in regards to API breakage. We like APIs that allow to shoot ourselves. It's way better than having to re-implement let's say |
@rkapsi We can expose all Netty channel options via some abstraction layer even if we shaded Netty, so no worries :-) |
Gentle reminder - I'll close this poll this evening (GMT+9). |
Closing the poll:
Let us not shade Netty. |
Related issues:
We must decide to shade Netty or not in our shaded JARs.
Why? Because we cannot shade Netty as long as we expose Netty classes in our public API.
Why? Because otherwise our public API will be different between our shaded JARs and unshaded JARs.
Therefore, if we decide to shade Netty in our shaded JARs, we must hide all references to Netty classes from our public API. This will involve some breaking changes such as:
EventLoop
andChannelOption
AsciiString
- affectsHttpHeaders
a lotAttributeMap
- affectsRequestContext.attrs()
Headers
- affectsHttpHeaders
a lot, becauseHttpHeaders
extendsHeaders
ByteBuf
- affectsByteBufHttpData
Some may argue that such a large change can't be justified, given that Netty 4.1 has been fairly stable recently and 4.0 reached at its end of life.
In my opinion, there are three options for this matter:
netty-common
,netty-buffer
,netty-transport-*
andnetty-codec
. Shade other Netty dependencies such asnetty-codec-http
,netty-codec-http2
andnetty-resolver-*
AsciiString
,AttributeMap
,ByteBuf
,EventLoop
,ChannelOption
andHeader
.Please feel free to ask questions or discuss about the pros and cons of each choice. Please add the following reactions to this issue to cast a vote:
This poll will be open for about a week.
The text was updated successfully, but these errors were encountered: