What is Netty Framework
Netty Framework, an asynchronous event-driven network application framework is a new rage for the Java Network Application Development. It comprises protocol servers and clients facilitating the rapid development of maintainable high-performance software. This application framework and its tools simplify network programming and are maintained by the Netty Project Community.
Netty can also be categorized as a NIO client-server framework, enabling quick and easy development of network applications to simplify and streamline network programming for TCP and UDP socket servers. Netty boasts of a conducive development environment with assured stability and high-end performance. It also includes the reactor pattern for programming.
The inbuilt HTTP protocol support supports WebSockets and allows the framework to run within servlet containers. The latest Netty on the block supports backend activities with NIO and blocking Java.
Features of NETTY Framework:
The Transport Services include the following
- Socket and Datagram
- HTTP Tunnel
- In-VM Pipe
Protocol Support is extended in the following manner
- Web Socket
- Google Protocol buffers
- Large File Transfer
- Zlib or gzip compression
- Binary Protocols
- Other Legacy Text
- Extensible Event Model
- Universal Communication API
- Zero Copy Capable Rich Byte Buffer
The design integrates a unified API for both the transport types; blocking and non-blocking sockets. The event model is extensible and allows clear separation of concerns. The thread model offers the flexibility of choosing between a single thread or one or more thread pools like SEDA. The threads are highly customizable too. The datagram support is truly connectionless as well. The Netty pipeline abstraction coupled with the safe threads and dynamic mutability makes strong support for this framework.
Performance & Efficiency
Netty offers more than stable performance with better throughput and lower latency, limiting memory copies to absolutely necessary numbers only. The Zero Copy Capable Rich Byte Buffer feature enables the Kernel to manage to copy with Direct Memory Access (DMA). This reduces the load on the CPU and the system bus, increasing the efficiency of the framework manifolds.
Scalability & Integration
Netty allows scalability and supports scaling up to more than a thousand connections, with no performance bottlenecks maintaining efficiency. The reliability of these connections is very high and lapses free. Netty is easy to extend and build upon. Netty also offers neat integration with other environments like Linux, Java, C#, C++ or Python, making it a robust and versatile framework to depend on.
The complete SSL/TLS and StartTLS support makes the Netty framework a very secure and safe framework
The documentation in Netty contains many guides, tutorials and JavaDocs besides examples to assist developers. This attributes to the growing popularity of Netty amongst the developer community.