Skip to content

Netty: IDE warnings cleanup, removed unnecessary inheritance, simplified code.#2831

Merged
NateBrady23 merged 2 commits intoTechEmpower:masterfrom
doom369:master
Jun 1, 2017
Merged

Netty: IDE warnings cleanup, removed unnecessary inheritance, simplified code.#2831
NateBrady23 merged 2 commits intoTechEmpower:masterfrom
doom369:master

Conversation

@doom369
Copy link
Contributor

@doom369 doom369 commented May 30, 2017

Removed

b.childOption(ChannelOption.ALLOCATOR, new PooledByteBufAllocator(true));

as netty now uses PooledByteBufAllocator by default.

HelloServerHandler now Inherits ChannelInboundHandlerAdapter instead of SimpleChannelInboundHandler. As ChannelInboundHandlerAdapter does a bit less operations and allocated less for HelloServerHandler.

writeResponse divided into 2 methods for plain response and json response.

@mention-bot
Copy link

Thanks @doom369 for contributing to The Framework Benchmarks! @lneves and @normanmaurer, code you've worked on has been modified. If you have the chance, please review. If you wish to unsubscribe from these notices, please open a Pull Request with the commit message [ci skip] and your github name added to the userBlacklist array in the .mention-bot file.

@doom369 doom369 changed the title IDE warnings cleanup, removed unnecessary inheritance, simplified code. Netty: IDE warnings cleanup, removed unnecessary inheritance, simplified code. May 30, 2017
@lneves
Copy link
Contributor

lneves commented May 31, 2017

After this change "wrk" starts giving lots of connection errors, curl also complains with the warning: "Excess found in a non pipelined read".
Don't have time to debug it now. @doom369 can you confirm this behaviour?

@doom369
Copy link
Contributor Author

doom369 commented May 31, 2017

@lneves interesting. Let me check.

@lneves
Copy link
Contributor

lneves commented May 31, 2017

here you go:

curl -v http://127.0.0.1:8080/json
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /json HTTP/1.1
> Host: 127.0.0.1:8080
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< content-type: application/json
< server: Netty
< date: Ter, 30 mai 2017 18:15:04 WEST
< content-length: 27
< 
* Excess found in a non pipelined read: excess = 26, size = 27, maxdownload = 27, bytecount = 0
* Connection #0 to host 127.0.0.1 left intact

@doom369
Copy link
Contributor Author

doom369 commented May 31, 2017

@lneves yeah, thanks. My bad. Fixed.

@lneves
Copy link
Contributor

lneves commented May 31, 2017

LGTM!

@NateBrady23 NateBrady23 merged commit 560fa0c into TechEmpower:master Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants