Skip to content

Commit

Permalink
Initial rough pass at Netty 4 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed Aug 6, 2013
1 parent 8cb5b47 commit a9ac1ff
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Netty_4_Upgrade_Notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Resources
---------

http://netty.io/news/2013/06/18/4-0-0-CR5.html
http://netty.io/4.0/api
http://docs.jboss.org/netty/3.2/api/


Relevant Changes
----------------
1. ServerBootstrap no longer takes a ServerSocketChannelFactory in its constructor. We used to use this to configure the thread pools. Looks like EventLoopGroup or its relatives are the place to look.

2. Same thing as #1 is true for ClientSocketChannelFactory.

3. ChannelPipelineFactory is gone. Looks like one uses .childHandler() with a ChannelInitializer instead.

4. What's up with ThreadRenamingRunnable in DefaultHttpProxyServer?

5. DefaultChannelGroup?

6. SimpleChannelUpstreamHandler -> SimpleChanneInboundHandler

7. InterestOps is gone - what does this mean to setReadable() and channelInterestChanged() ?

8. channelOpened() -> channelRegistered() ?

9. channelClosed() -> channelDeregistered() ?
53 changes: 53 additions & 0 deletions Yuml_Class_Diagram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// This code generates a UML diagram on yuml.me. The diagram's purpose is mostly to understand dependencies
// in order to facilitate the upgrade from Netty 3.x to 4.x. It is neither a precise, complete nor accurate representation
// of the object model.
// Green background - Netty classes that appear to be carrying over from 3.x to 4.x
// Red background - Netty classes that were lost in 4.x
// Orange background - Netty classes introduced in 4.x that replace a class from 3.x




[<<HttpProxyServer>>]^-.-[DefaultHttpProxyServer]
[DefaultHttpProxyServer]creates ->[<<ProxyAuthorizationManager>>]
[<<ProxyAuthorizationManager>>]^-.-[DefaultProxyAuthorizationManager]
[DefaultHttpProxyServer]creates ->[<<ChainProxyManager>>]
[DefaultHttpProxyServer]creates ->[<<HandshakeHandlerFactory>>]
[<<HandshakeHandlerFactory>>]^-.-[SslHandshakeHandlerFactory]
[<<HandshakeHandlerFactory>>]^-.-[SelfSignedSslHandshakeHandlerFactory]
[DefaultHttpProxyServer]creates ->[<<HttpRequestFilter>>]
[<<HttpRequestFilter>>]^-.-[PublicIpsOnlyRequestFilter]
[<<HttpRequestFilter>>]^-.-[RegexHttpRequestFilter]
[<<HttpRequestFilter>>]^-.-[ProxyUtils.PASS_THROUGH_REQUEST_FILTER]
[DefaultHttpProxyServer]creates ->[<<HttpResponseFilters>>]
[DefaultHttpProxyServer]creates ->[<<ProxyCacheManager>>]
[<<ProxyCacheManager>>]^-.-[DefaultProxyCacheManager]
[<<ProxyCacheManager>>]^-.-[SimpleProxyCacheManager]
[<<ProxyCacheManager>>]^-.-[ProxyUtils.Noop Cache Manager]
[DefaultHttpProxyServer]creates ->[<<ChannelGroup>>{bg:green}]
[<<ChannelGroup>>]^-.-[DefaultChannelGroup]
[DefaultHttpProxyServer]creates ->[<<Timer>>{bg:green}]
[<<Timer>>]^-.-[HashedWheelTimer{bg:green}]
[DefaultHttpProxyServer]creates ->[<<ServerSocketChannelFactory>>{bg:red}]
[<<ServerSocketChannelFactory>>]^-.-[NioServerSocketChannelFactory{bg:red}]
[DefaultHttpProxyServer]creates ->[<<ClientSocketChannelFactory>>{bg:red}]
[<<ClientSocketChannelFactory>>]^-.-[NioClientSocketChannelFactory{bg:red}]
[<<ChannelFactory>>{bg:green}]^-.-[<<ServerSocketChannelFactory>>]
[<<ChannelFactory>>{bg:green}]^-.-[<<ClientSocketChannelFactory>>]
[DefaultHttpProxyServer]creates ->[ServerBootstrap{bg:green}]
[ServerBootstrap]->[<<ServerSocketChannelFactory>>]
[<<ServerSocketChannelFactory>>]superseded by ->[<<EventLoopGroup>>{bg:orange}]
[<<ClientSocketChannelFactory>>]superseded by ->[<<EventLoopGroup>>{bg:orange}]
[ServerBootstrap]->[<<ChannelPipelineFactory>>{bg:red}]
[<<ChannelPipelineFactory>>]^-.-[HttpServerPipelineFactory]
[<<ChannelPipelineFactory>>]superseded by ->[<<ChannelInitializer>>{bg:orange}]
// Next section - HttpServerPipelineFactory
[HttpServerPipelineFactory]->[<<ChannelGroup>>{bg:orange}]
[HttpServerPipelineFactory]->[<<ProxyAuthorizationManager>>]
[HttpServerPipelineFactory]->[<<ChainProxyManager>>]
[HttpServerPipelineFactory]->[<<HandshakeHandlerFactory>>]
[HttpServerPipelineFactory]->[<<RelayPipelineFactory>>]
[<<RelayPipelineFactory>>]^-.-[DefaultRelayPipelineFactory]
[<<RelayPipelineFactory]->[<<ChannelPipelineFactory>>]
[HttpServerPipelineFactory]->[<<Timer>>]
[HttpServerPipelineFactory]->[<<ClientSocketChannelFactory>>{bg:orange}]

0 comments on commit a9ac1ff

Please sign in to comment.