Java NIO框架Mina, Netty, Grizzly比较

Mina:

Mina (Multipurpose Infrastructure for Network Applications) is a relatively new project of the Apache organization, it provides a very convenient framework for the development of high-performance and high-availability network applications. The current release version of Mina 2.04 support Java NIO technology-based TCP / UDP application development, and serial communication program, Mina the support function is also expanded. Currently being used Mina applications include: Apache Directory Project, AsyncWeb, AMQP (Advanced Message Queuing Protocol), RED5 Server (Macromedia Flash Media RTMP), ObjectRADIUS, Openfire and so on.

 

Netty:

Netty is an asynchronous event-driven network application framework and tools for rapid development of maintainable high-performance, highly scalable protocol server and client. In other words, Netty is a NIO client / server framework to support rapid and easy development of network applications such as protocol servers and client. It greatly simplifies network programming, such as TCP and UDP socket server.

 

Grizzly:

Grizzly is an application framework, geared to write tens of thousands of users to access the server when the various issues that arise. As a basis for using the Java NIO, and hide the complexity of programming. Easy-to-use, high-performance API. The bring non-blocking socketd the protocol processing layer. High-performance buffer and buffer management using high-performance thread pool.

 

OK, we can now look at a simple comparison of the three.

 

First of all, from the design concept, Mina's design concept is the most elegant. Of course, since the the Netty leading author and Mina-led by the same person, by the hands of the same person Netty and Mina in the design concept is basically the same. Grizzly in the design concept is poor, almost simple Java NIO package.

 

Secondly, from the view of the origin of the project, Mina was born in Daniel Apache open source community organization, Netty was born in commercial open source tycoon JBoss the Grizzly born inEupolyphaga Sun. From its origin can see a wide range of procedures for its application, so far, I have seen the industry or more Mina, Netty also slowly application, Grizzly seems to be the only Sun own project, if it is There are other companies or open source project, that even if my ignorance.

 

Finally, from the entry documents, Mina see World relatively long time, the official and civil documentation and Getting Started Sample considerable. Netty official documentation they have done well, and civil documentation is necessary with respect to Mina less. Grizzly, whether official or private, are rarely seen in its documentation.

 

After the above describes a simple comparison, Mina, Netty, Grizzly three you choose Which beauty?In the evaluation Write oh.

 

 

-------------------------------------------------- -----------------------

  • mina than Netty appear early, are Trustin Lee's work;
  • mina kernel and some characteristics of contact is too close, so that users do not need these features can not be divorced from the performance will decline compared to the next; Netty solve design problems
  • The documentation of netty clearer, has a lot of the mina characteristics in netty;
  • Netty update cycle is shorter, the release of a new version of the fast;
  • little difference of their architecture, mina rely on apache survival, and the the netty rely on jboss and jboss combination of very high Netty have support for google protocal buf, more complete the ioc container support (spring, guice, jbossmc and osgi);
  • netty is much easier to use than the mina, Netty, you can customize the processing upstream events or / and Downstream Events decoder and encoder can be used to decode and encode send content;
  • netty and Mina there are some differences in the processing of UDP Netty UDP connectionless characteristics exposed senior levels of abstraction; mina UDP, UDP as connection-oriented protocol, netty do This is a little more difficult.

猜你喜欢

转载自zhu-zhiguo.iteye.com/blog/2124788