Netty Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 17: Line 17:
The ChannelHandlerContext represents the binding between the ChannelPipeline and its installed handlers.
The ChannelHandlerContext represents the binding between the ChannelPipeline and its installed handlers.


"Server" and "client" denote behaviors relative to the network: a "server" binds to a port and listens for incoming connections, whereas a "client" initiates a network connection to a remote (over the network) process.
"Server" and "client" denote behaviors relative to the network: a "server" binds to a local port and listens for incoming connections, whereas a "client" initiates a network connection to a remote (over the network) process.

Revision as of 22:15, 15 September 2020

Internal

Overview

High throughput non-blocking I/O. Servers and clients. Channel. ChannelPipeline that holds ChannelHandler instances. ChannelHandler is important because it represents the interface between networking concerns and application business logic. Events. Everything is an event (accept new connection, read data, write data - in this context data is an event). Event lifecycle. Events are processed by EventLoops.

Transport and NIO Transport.

Both the server and the client go through a bootstrapping process. This is where the business logic (ChannelHandlers) is "deployed".

Netty is both a framework and a class library.

The ChannelHandlerContext represents the binding between the ChannelPipeline and its installed handlers.

"Server" and "client" denote behaviors relative to the network: a "server" binds to a local port and listens for incoming connections, whereas a "client" initiates a network connection to a remote (over the network) process.