Preface The most fundamental question, What is Netty and why should I care?, will be answered here.
The Problem We are using a general purpose application or library to communicate with each other nowadays. For example, we often use an open source HTTP client library to retrieve information from an open source web server and to invoke a remote procedure call via web services. However, a general purpose protocol or its implementation sometimes doesn't scale very well. It's like we don't use a general purpose HTTP server to exchange huge files, e-mail messages, and near-realtime messages such as financial information and multiplayer game data. What's required is a highly optimized protocol implementation which is dedicated to a special purpose. For example, you might want to implement an HTTP server which is optimized for AJAX-based chat application. You could even want to design and implement a whole new protocol which is precisely tailored to your need. Another inevitable case is when you have to deal with a legacy proprietary protocol to ensure the interoperability with an old system. What matters in this case is how quickly we can implement that protocol while not sacrificing the stability and performance of the resulting application.
The Solution The Netty project is an effort to provide an asynchronous · event-driven network application framework and tooling for rapid development of maintainable high-performance · high-scalability protocol servers and clients. To simplify, Netty helps you to write your own network application very easily -- it's often called rapid network application development. Rapid network application development doesn't mean that a resulting application will suffer from a maintainability or a performance issue. Netty has been designed carefully with the experiences earned from the implementation of a lot of protocols such as FTP, SMTP, HTTP, and various binary and text-based legacy protocols. As a result, Netty has succeeded to find a way to achieve ease of development, performance, stability, and flexibility without a compromise. Some of you might already have found other network application framework that claims to have the same advantage, and you might want to ask what makes Netty so different from them. The answer is the philosophy where it is built on. It's designed to give you the most comfortable experience both in terms of the API and the implementation from the day one. It's not something tangible but you will get to realize that this philosophy will make your life much easier as you read this guide and play with Netty.