JBoss Netty 3.1 Released
Netty 3.1.0 was recently released by the JBoss Community and is another option when writing client/server network applications. Netty is self-described as,
an asynchronous event-driven network application framework and tools for rapid development of maintainable high performance and high scalability protocol servers and clients. In other words, Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server.
As far as categorizing Netty, it falls in the same arena as Apache Mina and Grizzly. This latest release includes a host of features and enhancements to performance and API usability. Some of the features include:
- Easier large data streaming (example)
- More reliable OutOfMemoryError prevention
- New Transports
- OIO and NIO based UDP transport
- In-VM Transport
- HTTP Tunneling
- Integration with Google Protocol Buffers
- Integration with JBoss Microcontainer, OSGi, Guice and Spring
The HTTP Tunneling feature was just one of the highly requested features and was briefly summarized in an earlier set of release notes,
HTTP Tunneling Transport (in org.jboss.netty.channel.socket.http) is a socket transport which allows any existing socket applications to be proxied over HTTP. This transport is particularly useful when you need to bypass a firewall without modifying an existing server application. To illustrate how this works, it looks like the following:
HttpTunnelingClientSocketChannel --> HTTP-friendly Firewall --> Servlet Container (e.g. Tomcat, Jetty) --> HttpTunnelingServlet --> Your Server Application
Of course when selecting a framework for developing network applications performance and scalability can be major factors in the final decision. The Netty team has performance information available from their site. You can also find performance information on the Apache Mina site. Lastly, Nicholas Hagen posted a series of blog posts describing his exploration into choosing Mina, Grizzly or Netty. At the end he decides to choose Netty but closes with the following statement:
Overall, I have come to prefer Netty over both Mina and Grizzly for performance, memory, and feature usage. Note that you should undergo your own analysis to decide which library suits your requirements.
The next version of Netty, 3.2.0, is under development with the road map both viewable and editable by the community.
Iordanis Giannakakis, Savvas Dalkitsis Aug 28, 2015
Ben Linders Aug 28, 2015