Netty Home

Preface

The Problem

Nowadays we use general purpose applications or libraries to communicate with each other. For example, we often use an HTTP client library to retrieve information from a web server and to invoke a remote procedure call via web services. However, a general purpose protocol or its implementation sometimes does not scale very well. It is 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, media streaming, or large file transfer. 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 the rapid development of maintainable high-performance · high-scalability protocol servers and clients.

In other words, Netty is an 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 development.

'Quick and easy' does not 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 users 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 it is built on. Netty is designed to give you the most comfortable experience both in terms of the API and the implementation from the day one. It is not something tangible but you will realize that this philosophy will make your life much easier as you read this guide and play with Netty.

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!

序言
   问题
现在,我们使用通用应用程序或者程序库来相互交流。例如:我们经常使用HTTP客户端库来获取web 服务器信息或者在web services上面来进行远程调用。然后,一个通用的或者实现并不够规模。很显然我们不同使用一个通用的HTTP 服务器来交互大文件,e-mail 消息和实时金融消息 和多人游戏消息。 为了一个特殊的目的,我们需要高度优化的专用的协议。例如:如果想实现一个基于AJAX聊天的HTTP应用服务器,数字媒体以及大文件交互.你甚至想设计和实现一个新的协议来满足需要。
另外一个不可避免的情况是你不得不解决遗留的协议来确保和旧系统来协同工作。
在这种情况下,如何快速实现新协议同时不牺牲应用程序的稳定性和性能呢?
   解决
Netty项目提供一个异步事件驱动网络应用程序框架和工具来快速开发,高性能,高度灵活的协议服务器端和客户端。
换句话说,Netty是一个NIO 客户端服务器端框架,该框架可以快速、简单的开发一个网络应用程序。例如协议的服务端和客户端。Netty极大简化和流水线式开发TCP 和UDP Socket的服务开发。
快速和简单并不意味着应用程序最终会不稳定和性能低下。Netty 已经从许多协议实现,例如: FTP, SMTP, HTTP 等多种二进制和文本为基础的协议中获取到大量经验,并且详细的设计。结果,Netty 在架构的简单开发,性能,稳定性,灵活性上取得成功。
一些使用者也许已经发现其他应用程序框架声称一些同样的优点,也许会问netty 和他们有什么区别.答案是netty的建立的理念。 Netty被设计提供最合适的经验。从建立开始,无论是API和实现.




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值