1. Netty 3.x Source Analysishistorical

    1. Overview 2. Boss-array initialization 3. Worker-array initialization 4. Bind

  2. Summaryhistorical

    Historical Netty source-analysis summary diagrams

  3. Off-Heap Memoryhistorical

    1. What off-heap memory is 2. NIO off-heap memory 3. Netty off-heap memory 4. References

  4. 2.56 1. Create NioEventLoopGrouphistorical

    NioEventLoopGroup class hierarchy, constructor chain, initialization of selector/select strategy/rejection policy, EventLoop count, executor, child EventLoops, and chooser.

  5. 2. Bootstrap Creationhistorical

    1. Code to analyze 2. Create ServerBootstrap 3. Set ServerBootstrap properties 4. ReflectiveChannelFactory

  6. 3. Bind the Porthistorical

    1. Code to analyze 2. Server binds the port

  7. 1. Detect a New Connectionhistorical

    1. Set a breakpoint 2. New connection enters

  8. Pipeline Initializationhistorical

    1. When pipeline is created 2. What pipeline looks like 3. Tail and Head

  9. 1. Creating the Serverhistorical

    bind, channelFactory, and creation of NioServerSocketChannel

  10. Create Executorhistorical

    1. Code to analyze 2. Create the thread factory 3. Create the executor

  11. 2. Create NioSocketChannelhistorical

    1. Code to analyze 2. NioSocketChannel constructor

  12. Adding and Removing ChannelHandlershistorical

    1. Add a handler 2. Remove a handler

  13. 2. Server Initializationhistorical

    Call path and ServerBootstrap.init

  14. Create the NioEventLoop Arrayhistorical

    1. Code to analyze 2. Parameters passed to NioEventLoop 3. NioEventLoop is a single-threaded thread pool 4. Constructor

  15. 3. Allocate a Thread and Register the Selectorhistorical

    1. Code to analyze 2. Propagate through the pipeline 3. Pass through ServerBootstrapAcceptor 4. Analyze channelRead

  16. 3. Register the Selectorhistorical

    Call path and event-loop registration

  17. 4. Register Read Events with the Selectorhistorical

    1. Code to analyze 2. Set a breakpoint and connect with nc 3. Propagate channelActive 4. Reach HeadContext 5. Read through AbstractUnsafe

  18. 4. Bind the Server Porthistorical

    Call path, AbstractBootstrap, AbstractUnsafe, and AbstractNioChannel

  19. Server Startuphistorical

    Historical server-startup diagram

  20. 2.79 1. Instantiate the Channelhistorical

    Instantiate NioServerSocketChannel through reflection, configure it as non-blocking, and create channelId, Unsafe, and pipeline.

  21. Netty Bind Source: Actually Binding the Listening Porthistorical

    1. Code to analyze. 1.1. How NioEventLoop executes the Runnable. 1.2. What the bind task executed by NioEventLoop does, including JDK NIO bind, channelActive propagation, and registering interest in accept events.

  22. Inbound Eventshistorical

    1. Add handlers for the experiment 2. Start from the pipeline 3. Forward through AbstractChannelHandlerContext 4. Enter HeadContext 5-8. Traverse inbound handlers to TailContext

  23. ByteBufhistorical

    Data structure, API, class hierarchy, and classification

  24. 2. Initialize Channelhistorical

    1. Code to analyze 2. Obtain the channel pipeline and add a ChannelInitializer

  25. Netty Source: NioEventLoop run Methodhistorical

    Code analysis of the NioEventLoop run loop: select, selector rebuild, selected-key optimization, processSelectedKeys, and asynchronous task execution.

  26. Outbound Eventshistorical

    1. Add handlers for the experiment 2. Start from the pipeline 3. Enter TailContext 4-7. Traverse outbound handlers back to HeadContext

  27. ByteBufAllocatorhistorical

    ByteBufAllocator class hierarchy, AbstractByteBufAllocator, unpooled allocation, and pooled allocation

  28. 2.91 3. Register the Channelhistorical

    Select a NioEventLoop, create a ChannelPromise/Future, register the channel through Unsafe with the JDK NIO selector, and invoke handlerAdded/initChannel callbacks.

  29. Exception Eventshistorical

    1. Prepare experiment data 2. Start debugging 3-7. Propagate the exception through handlers to TailContext

  30. Usagehistorical

    Historical example of allocating, reading, writing, and releasing a pooled direct ByteBuf

  31. Channel Class Hierarchyhistorical

    1. Channel class hierarchy 2. Config class hierarchy

  32. PooledByteBufAllocatorhistorical

    newDirectBuffer, PoolThreadLocalCache, PoolThreadCache, and PoolArena

  33. PoolThreadCachehistorical

    Constructor and the tiny, small, and normal MemoryRegionCache groups