By the end of the chapter, youll understand what Netty is and what it offers, and youll gain
enough understanding about Javas NIO and asynchronous processing to enable you to work
through the other chapters of this book.
1.1 Why Netty?
In the words of David Wheeler, all problems in computer science can be solved by another
level of indirection.
1
As an NIO client-server framework, Netty offers one such level of
indirection. Netty simplifies network programming of TCP or UDP servers but you can still
access and use the low-level APIs because Netty provides high-level abstractions.
1.1.1 Not all networking frameworks are alike
With Netty, quick and easy doesnt mean that a resulting application suffers from
maintainability or performance issues. The experiences earned from the implementation of
protocols such as FTP, SMTP, HTTP, WebSocket, SPDY and various binary and text-based
legacy protocols led Nettys founders to take great care in its design. As a result, Netty
successfully delivers ease of development, performance, stability, and flexibility without
compromise.
High-profile companies and open-source projects including RedHat, Twitter, Infinispan, and
HornetQ, Vert.x, Finagle, Akka, Apache Cassandra, Elasticsearch, and others use and
contribute to Netty. Its also fair to say that some of the features of Netty are a result of the
needs of these projects. Over the years, Netty has become more widely known and is one of
the most-used networking frameworks for the JVM, as evident by its use in several popular
open- and closed-source projects. In fact, Netty was awarded the Dukes Choice Award
2
in
2011.
Also in 2011, Netty founder Trustin Lee left RedHat to join Twitter. At this point, the Netty
project became independent of any company in an effort to simplify contributions to it. Both
Red Hat and Twitter use Netty, so it should come as no surprise that these two companies are
the biggest contributors to Netty at the time of writing. Adoption of Netty continues to
increases, as does the number of individual contributors. The community of Netty users is
active and the project remains vibrant.
1.1.2 Netty boasts a rich feature set
As you work through the chapters of this book, youll learn about and use many of Nettys
features. Figure 1.1 highlights some of the supported transports and protocols to give you a
brief overview of the Netty architecture.
1
Add citation
2
Add citation
©Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and
other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.
http://www.manning-sandbox.com/forum.jspa?forumID=857