netty由JBOSS提供的一个开源框架。主要实现异步、事件驱动的网络应用程序。说简单的,我们用netty开发最常的就是是开发基于tcp/ip或udp层的程序。(公司内容调用,比如bus系统需要用调search或导航程序等 )。对外提供的接口应用,一般就基于http协议或https协议即可。
主要特点:
一、NIO ,非阻塞式IO,我们可以用原生的JDK提供的NIO包开发一个基于NIO模式的socket服务端和客户端程序,但成本较高,还可能由于技术水平等各种原因,导致bug频出,因此,利用第三方的开源封装包,非常“物美价廉”了。
二、长连接,只需要在客户端和服务端开启keepalive=true即可。
官网
netty.io
Netty is
an asynchronous event-driven network application framework
for rapid development of maintainable high performance protocol servers & clients.
for rapid development of maintainable high performance protocol servers & clients.
It greatly simplifies and streamlines network programming such as
TCP and UDP socket
server.
与netty同名框架,实现socket编程
mina http://mina.apache.org/
Apache MINA is a network application framework which helps users develop high performance and high scalability network applications easily. It provides an abstract event-driven asynchronous API over various transports such as TCP/IP and UDP/IP via Java NIO.