Netty简介:
新特性:
- 处理大容量数据流更简单
- 处理协议编码和单元测试更简单
- I/O超时和idle状态检测
- 应用程序的关闭更简单,更安全更
- 可靠的OutOfMemoryError预防
新的传输方式:处理大容量数据流更简单
- 基于BIO和NIO的UDP传输
- 本地传输(又名 in-VM传输)
- HTTP通道,可绕过防火墙
新的编码器:
- HTTP客户端和服务器端
- 用于实现各种专有协议的工具
其他技术整合:
- Google Protocol Buffers
- JBoss Microcontainer, OSGi, Guice以及Spring
Netty Home
Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.
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.
'Quick and easy' 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.
Features
Design
- Unified API for various transport types - blocking and non-blocking socket
- Based on a flexible and extensible event model which allows clear separation of concerns
- Highly customizable thread model - single thread, one or more thread pools such as SEDA
- True connectionless datagram socket support (since 3.1)
Ease of use
- Well-documented Javadoc, user guide and examples
- No additional dependencies, JDK 5 (Netty 3.x) or 6 (Netty 4.x) is enough
Performance
- Better throughput, lower latency
- Less resource consumption
- Minimized unnecessary memory copy
Security
- Complete SSL/TLS and StartTLS support
Community
- Release early, release often
- The author has been writing similar frameworks since 2003 and he still finds your feed back precious!
参考链接:
文章导读:
1 Netty是什么? 2 Netty的架构 3 Netty的特性 4 Netty的使用 5 Netty源码分析 6 Netty事件驱动模型 7 Netty Pipeline流处理 8 Netty 通用通信API 9 Netty Zero-Copy-Capable Buffer 10 Netty数据流分析 11 Netty VS Mina