文件名称:netty in action
文件大小:2.93MB
文件格式:PDF
更新时间:2017-08-15 04:17:33
netty in action
This chapter introduces Netty, but its focus is Javas non-blocking IO (NIO) API. If youre new to networking on the JVM, this chapter is an ideal place to begin, but its also a good refresher for the seasoned Java developer. If youre familiar with NIO and NIO.2, feel free to skip ahead to chapter 2, which dives into Netty after you get it running on your machine. Netty is a NIO client-server framework, which enables quick and easy development of network applications, such as protocol servers and clients. Netty offers you a new way to develop your network applications, which makes it easy and scalable. It achieves this by abstracting away the complexity involved and by providing an easy-to-use API that decouples business-logic from the network-handling code. Because its built for NIO, the entire Netty API is asynchronous. Generally, network applications have scalability issues, whether theyre based on Netty or other NIO APIs. A key component of Netty is its asynchronous nature, and this chapter discusses synchronous (blocking) and asynchronous (non-blocking) IO to illustrate why and how asynchronous code solves scalability problems.