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

Refactoring to make MessageChannelHandler extensible #6915

Merged
merged 1 commit into from Jul 18, 2014

Conversation

spinscale
Copy link
Contributor

Small refactorings to make the MessageChannelHandler more extensible.
Also allowed access to the different netty pipelines

This is the fix after the first version had problems with the HTTP
transport due to wrong reusing channel handlers, which is the reason
why tests failed. This version now uses its own ChannelPipelineFactory
again.

Relates #6889 (which had been reverted in the first place)

@uboness
Copy link
Contributor

uboness commented Jul 18, 2014

LGTM

requestDecoder.setMaxCumulationBufferCapacity(Integer.MAX_VALUE);
} else {
requestDecoder.setMaxCumulationBufferCapacity((int) transport.maxCumulationBufferCapacity.bytes());
public ChannelPipelineFactory configureServerChannelPipelineFactory() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the implementation still be a static factory class that is returned?

@kimchy
Copy link
Member

kimchy commented Jul 18, 2014

LGTM

@spinscale
Copy link
Contributor Author

created static classes and added tests, should be ready now


private final NettyHttpServerTransport transport;
private static class HttpChannelPipelineFactory implements ChannelPipelineFactory {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make it protected

@uboness
Copy link
Contributor

uboness commented Jul 18, 2014

few comments, other than that LGTM

@uboness
Copy link
Contributor

uboness commented Jul 18, 2014

LGTM

Small refactorings to make the MessageChannelHandler more extensible.
Also allowed access to the different netty pipelines

This is the fix after the first version had problems with the HTTP
transport due to wrong reusing channel handlers, which is the reason
why tests failed.

Relates elastic#6889
Closes elastic#6915
@spinscale spinscale merged commit 1816951 into elastic:master Jul 18, 2014
spinscale added a commit that referenced this pull request Jul 18, 2014
Small refactorings to make the MessageChannelHandler more extensible.
Also allowed access to the different netty pipelines

This is the fix after the first version had problems with the HTTP
transport due to wrong reusing channel handlers, which is the reason
why tests failed.

Relates #6889
Closes #6915
@mattweber
Copy link
Contributor

Awesome, this should make it possible for someone to write the SSL transport support as a plugin. I had investigated going down this route a while back but got stuck because of the shading of the Netty jar. It tossed a bunch of the Netty code that was not used in ES but needed if I wanted to add the SSL support.

@jpountz jpountz removed the review label Jul 24, 2014
@clintongormley clintongormley changed the title Netty: Refactoring to make MessageChannelHandler extensible Internal: Refactoring to make MessageChannelHandler extensible Sep 8, 2014
@clintongormley clintongormley added the :Distributed/Network Http and internode communication implementations label Jun 7, 2015
@clintongormley clintongormley changed the title Internal: Refactoring to make MessageChannelHandler extensible Refactoring to make MessageChannelHandler extensible Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Network Http and internode communication implementations >enhancement v1.4.0.Beta1 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants