1, codec comparison
The Mina codec (codec) creates an instance with the following choices:
1 each received data to create a codec instance
2 Create a codec instance for all client links
Netty codecs to create an instance can have the following choices:
1 every time the link to create a codec instance
2 Create a codec instance for all client links
2, handler comparison
Mina's handler. Creating an instance can have the following choices:
1 Create a codec instance for all client links
Netty codecs to create an instance can have the following choices:
1 every time the link to create a handler instance
2 Create a handler instance for all client links
Third, document comparison
1, Netty and Mina documents are more, but the Mina document is not complete, Netty document is more clear
Four, UDP protocol transmission
1, Netty The UDP has no connection to the characteristics of the exposure, and Mina to UDP advanced level of abstraction, you can use UDP as a "connection-oriented" protocol, Netty need manual processing order, packet detection, and so on.
On-line evaluation:
1. Mina's connection to the kernel and some features is too tight, making it impossible for users to detach when they do not need these features, and the performance will be reduced compared to the Netty, which solves the design problem.
2. The basic architecture of Netty is almost exactly the same as that of Mina, but there are a lot of details to be improved (for example, Mina iosession to call Flip () every time she reads and writes, Netty Channel does not, and supports zero copy).
3. Netty is simpler to use than Mina.
4. About UDP Links: Mina with TCP and UDP as "connected" processing, a UDP request will be based on the address to generate a new iosession, the expiration time is 1 minutes, the benefit is obvious, but for the performance requirements of the project is not good, For a disconnected thing cache 1 minutes, most of the time may be white cache, do not work hard. Mina may have an original intention to do this is a continuous decoding, such as a packet is too large, divided two times transmission; but such a design should be a UDP taboo.
Related Blogs: http://my.oschina.net/leoson/blog?catalog=292948