A brief talk on JAVA common distributed implementation method and its advantages and disadvantages __java

Source: Internet
Author: User
Commonly used EJB, RMI, Web Service, as well as Hessian, NIO, and so on, their advantages and disadvantages compared to the following:



1:ejb
Advantages: Good scalability, strong security, support distributed transaction processing.
Disadvantage: Can not cross language, configuration is relatively complex, different Java container is difficult to do seamless migration.

2:rmi
Advantages: Object-oriented remote service model, based on TCP protocol services, execution speed is fast.
Disadvantage: cannot cross language; Each remote object binds ports, is not maintainable, and does not support distributed transaction JTA,RMI frameworks have limited support for security, transactions, and scalability.
3:web Service
Advantages: Cross-language, cross-platform, SOA implementation, high security, can be used to compatible with legacy system functions
Disadvantage: Relatively poor performance, does not support two-stage transaction
4:hessian
Advantages: Easy to use, fast, cross-language, Cross-platform, and can be used to compatible legacy system functions.
Disadvantage: Security is not strong enough to support two-stage transactions.
5:nio (Mina/netty)
Advantages: Based on TCP communication, the efficiency is higher than HTTP, non-blocking IO is more than sufficient to deal with high concurrency. According to the specific needs of the data transmission format, the scalability of strong.
Disadvantages: Cannot cross the language, cannot penetrate the firewall.



Java NiO framework Mina, Netty, Grizzly
Mina (Multipurpose Infrastructure for Network applications) is a relatively new project for the Apache organization, which provides a very convenient framework for developing high-performance and high-availability Web applications. The currently released version of Mina 2.04 supports TCP/UDP application development, serial communication programs based on Javanio technology, and functions supported by Mina are further extended. Currently, applications using Mina include: Apache Directory Project, Asyncweb, AMQP (Advanced messagequeuing Protocol), RED5 Server (Macromedia? Flashmedia RTMP), Objectradius, OpenFire and so on.


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


Grizzly is an application framework that addresses the various issues that arise when writing thousands of users to access servers. Use Javanio as the basis and hide the complexity of its programming. A high-performance API that is easy to use. Bring non-blocking socketd to protocol processing layer. leverages high-performance buffer and buffer management to use a high-performance thread pool.


The next is the difference ~ ~ ~
First of all, from the concept of design, Mina's design philosophy is the most elegant. Of course, since Netty's leading author is the same person as Mina's leading author, Netty, who came from the same person, is basically consistent with Mina in the design philosophy.    And grizzly in the design concept on the poor point, almost javanio simple encapsulation. Second, from the project's origins, Mina was born in the open source field of Daniel Apache, Netty from commercial open source tycoon JBoss, and Grizzly was born in the Turtle Sun Company.    From its origins can be seen in the broad application of the program, so far, I see the industry still use more than Mina, and Netty is also slowly applied, and grizzly seems to have only the sun's own projects to use. Finally, from the introductory documentation, the official and civil documents and introductory examples are considerably more due to the relative length of Mina's lifetime. Netty's official documents are well done, and civil documents are less than Mina's. As for grizzly, it is rare to see its documents, both official and civil.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.