What is Netty? Why is it so popular?
Netty is the most popular Java open source framework NIO framework provided by JBOSS. Netty provides asynchronous, event-driven network application framework and tools for rapid development of high performance, high reliability network server and client programs.
Compared to JDK native NIO, Netty provides a relatively simple and easy-to-use API that is ideal for network programming. Netty is implemented entirely based on NIO, so Netty is asynchronous.
As an asynchronous NIO framework, all I/O operations of Netty are asynchronous and non-blocking. Through the Future-Listener mechanism, users can obtain the RESULTS of I/O operations proactively or through notification mechanism.
Netty is NIO’s unquestionably superior framework in terms of robustness, functionality, performance, customizability, and extensibility. It has been validated by hundreds of commercial/commercial projects, such as Avro, RocketMQ, Hadoop’s RPC framework, and Dubbo, the leading distributed communication framework.
There’s a reason why it’s so popular.
The advantages of Netty can be summarized as follows
1. Easy to use API and low development threshold;
2, powerful, preset a variety of codec functions, support a variety of mainstream protocols;
3. With strong customization ability, the communication framework can be flexibly extended through ChannelHandler;
4, high performance, through the comparison with other industry mainstream NIO framework, Netty’s overall performance is the best;
5, mature, stable, Netty has fixed all the JDK NIO bugs found, business developers do not need to worry about NIO bugs;
6. Active community, short version iteration cycle, found bugs can be fixed in time, at the same time, more new functions will be added;
7, experienced large-scale commercial application test, quality has been verified. It has been successfully used in Internet, big data, online games, enterprise applications, telecom software and many other industries, proving that it has been fully able to meet the commercial applications of different industries.
What are the advantages over Mina?
1. All by Trustin Lee, Netty later;
2. Mina tied the kernel to some features too closely, so that users could not get rid of these features when they did not need them, which caused performance degradation. Netty solved this design problem.
3. Netty documentation is clearer. Many Mina features are available in Netty.
4, Netty update cycle is shorter, the release of the new version is faster;
5. Their architectures are not very different. Mina lives on Apache, while Netty lives on JBoss. More complete IOC container support (Spring, Guice, JBOSSMC and OSGi);
6. Netty is easier to use than Mina. In Netty, you can customize upstream events or/and downstream events, and use decoder and encoder to decode and encode the delivered content.
7. There are some differences between Netty and Mina when dealing with UDP. Netty exposes UDP as connectionless. Mina abstracts UDP as a “connection-oriented” protocol, which is difficult for Netty to do.
Why is Netty so popular? What are the advantages over Mina? Java technology stack, share the most mainstream Java technology -CSDN blog