Source Code Analysis
Java · 33 notes
- Netty 3.x Source Analysis (Historical)historical
Historical Netty 3 architecture and why its APIs/classes should not be projected onto modern Netty 4.x designs.
- Netty Source Analysis Summaryhistorical
A durable mental model for Netty server bootstrap, event loops, channel registration, pipelines, and ByteBuf allocation.
- Netty Direct / Off-Heap Memoryhistorical
Why Netty uses direct buffers, their I/O advantages and native-memory/reference-counting risks.
- Netty Source: Creating NioEventLoopGrouphistorical
Historical source view of how a NioEventLoopGroup creates and manages child event loops.
- Netty Source: Bootstrap Creationhistorical
How Bootstrap/ServerBootstrap accumulate configuration before channel registration and bind/connect.
- Netty Bind Source Summaryhistorical
End-to-end server bind flow: create, initialize, register, bind, activate, and complete the ChannelFuture.
- Netty Source: Detecting New Connectionshistorical
How readiness on a listening channel leads the event loop to accept new sockets.
- Netty Source: Pipeline Initializationhistorical
How every Channel owns a pipeline of handler contexts and how initial handlers are installed.
- Netty Server Startup: Creating the Server Channelhistorical
First server-startup phase: Bootstrap configuration produces a concrete listening-channel instance.
- Netty Source: Creating EventLoop Executorshistorical
How Netty associates event loops with executors/threads and why event-loop thread ownership matters.
- Netty Source: Creating an Accepted NioSocketChannelhistorical
Wrapping an accepted socket as a child Channel with pipeline/configuration and parent relationship.
- Netty Pipeline: Adding and Removing ChannelHandlershistorical
Dynamic pipeline modification, handler lifecycle callbacks, event-loop serialization, and sharability constraints.
- Netty Server Startup: Initializing the Server Channelhistorical
Applying parent options/attributes and installing child-channel initialization logic before registration.
- Netty Source: Creating NioEventLoop Childrenhistorical
Creation of the event-loop child set and channel-to-event-loop selection in a NioEventLoopGroup.
- Netty Source: Assigning an Accepted Channel to an EventLoophistorical
Selecting a worker event loop and registering the accepted child channel for thread-confined I/O processing.
- Netty Server Startup: Registering with the EventLoophistorical
Assigning the server channel to an event loop and transport selector before binding.
- Netty Source: Registering Read Interesthistorical
How an active socket channel becomes interested in read readiness and feeds inbound pipeline events.
- Netty Server Startup: Binding the Porthistorical
Asynchronous local-address bind, channel activation, failure handling, and bind future completion.
- Netty Server Startup Overviewhistorical
ServerBootstrap to active listener: channel creation, initialization, event-loop registration, and bind.
- Netty Bind Source: Instantiating the Channelhistorical
Historical source flow from configured channel factory to a server Channel instance before registration.
- Netty Bind Source: Binding the Listening Sockethistorical
How an event-loop-owned server channel performs the transport bind and transitions toward active listening state.
- Netty Pipeline: Inbound Eventshistorical
Propagation of channel lifecycle and read events through inbound handlers.
- Netty ByteBufhistorical
Reader/writer indexes, heap/direct buffers, slicing, reference counting, and ownership rules.
- Netty Bind Source: Initializing the Channelhistorical
Applying options, attributes, and pipeline handlers to a newly created server channel.
- Netty Source: NioEventLoop Run Loophistorical
Selector waiting, selected-key processing, queued tasks, scheduling, and fairness inside a Netty NIO event loop.
- Netty Pipeline: Outbound Eventshistorical
Propagation of writes, flushes, binds, connects, closes, and other outbound operations through handlers toward the transport.
- Netty ByteBufAllocatorhistorical
Allocator abstraction for heap/direct, pooled/unpooled buffers and why allocation strategy is configurable.
- Netty Bind Source: Registering the Channelhistorical
Assigning a Channel to an EventLoop, registering with selector/transport state, and firing registration events.
- Netty Pipeline: Exception Propagationhistorical
How handler failures become exceptionCaught events and why exceptions need explicit logging, cleanup, and connection policy.
- Using Netty ByteBuf Allocation Safelyhistorical
Allocator usage, capacity, slicing, copying, reference-count handling, and leak-safe buffer ownership.
- Netty Channel Type Hierarchyhistorical
Conceptual Channel hierarchy across transport-independent API, abstract channel support, and concrete NIO/native transports.
- Netty PooledByteBufAllocatorhistorical
Pooled ByteBuf allocation, arenas/chunks/suballocation concepts, reuse benefits, and version-sensitive allocator internals.
- Netty PoolThreadCachehistorical
Per-thread pooled buffer caching as an allocation optimization, with retention and event-loop affinity trade-offs.