Java NIO framework Mina, Netty, Grizzly introduction and comparison

Java NIO framework Mina, Netty, Grizzly introduction and comparison

Mina:

Mina (Multipurpose Infrastructure for Network Applications) is a relatively new project organized by Apache, which provides a very convenient framework for developing high-performance and high-availability network applications. The currently released Mina version 2.04 supports the development of TCP/UDP applications and serial communication programs based on Java NIO technology, and the functions supported by Mina are also being further expanded. At present, the applications that are using Mina 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 tool for the rapid development of maintainable high-performance, highly scalable protocol servers and clients. That said, Netty is a NIO client/server framework that enables fast and easy development of network applications such as protocol servers and clients. It greatly simplifies network programming, such as TCP and UDP socket servers.


Grizzly:

 Grizzly is an application framework designed to solve the various problems that arise when writing thousands of users accessing a server. Use JAVA NIO as a base and hide the complexity of its programming. Easy-to-use high-performance API. Brings non-blocking socketd to the protocol processing layer. Take advantage of high-performance buffering and buffer management using a high-performance thread pool.


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


First of all, in terms of design concept, Mina's design concept is the most elegant. Of course, since the lead author of Netty and Mina are the same person, Netty, which is written by the same person, is basically the same as Mina in design concept. Grizzly is a bit poorer in design concept, almost a simple encapsulation of Java NIO.

Secondly, from the perspective of the origin of the project, Mina was born in the Apache organization, a big bull in the open source world, Netty was born in the commercial open source tycoon Jboss, and Grizzly was born in the local Sun company. From its origin, it can be seen that it has a wide range of applications. So far, I have seen that the industry still uses Mina more, and Netty is slowly being applied, while Grizzly seems to be used only by Sun's own projects. There are other companies or open source projects using it, so I'm ignorant.


Finally, in terms of entry-level documentation, since Mina has been around for a relatively long time, there are quite a lot of official and private documentation and entry-level examples. Netty's official documentation is also doing a good job, and the folk documentation is less than that of Mina. As for Grizzly, its documentation is rarely seen, whether it is official or private.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325982558&siteId=291194637