Java Remote Communication Optional technology and principle

Source: Internet
Author: User
Tags soap

One of the most fundamental issues in a distributed service framework is how remote services communicate, and there are many technologies in the Java domain that enable remote communication, such as RMI, MINA, ESB, Burlap, Hessian, SOAP, EJB, and JMS, What is the relationship between these nouns? What exactly are they based on, knowing that these are the basics of implementing a distributed service framework, and if there is a high performance requirement, the mechanism behind these technologies is essential, and in this blog we will look into the future, We welcome you to provide more information about the technology and principle of remote communication.

Basic principle

To achieve communication between network machines, first of all, to look at the basic principles of computer network communication, at the bottom level to see, network communication needs to do is to transfer the flow from one computer to another computer, based on the transmission protocol and network IO to achieve, where the transport protocol is more famous for HTTP, TCP, UDP, and so on, HTTP, TCP, UDP are for a class of applications defined by the transport Protocol, network IO, mainly bio, NIO, Aio three ways, all the distributed application communication based on this principle, but for the application of ease of use, Languages often provide some application-level protocols that are more user-friendly.

Application-level protocols

Remote service communications, the goal to be achieved is to initiate a request on one computer, and the other to process and return the result to the requesting side after receiving the request, in which there are requests such as one way request, synchronous request, asynchronous request, etc., according to the principle of network communication, What needs to be done is to convert the request to a stream, transmit it to the far end through the transfer Protocol, and the remote computer will process it after receiving the requested stream, and after processing, the result is converted to a stream and returned to the caller via the transport protocol.

The principle is this, but for the convenience of application, the industry has introduced a lot of application-level protocols based on this principle, so that everyone can not go directly to the bottom of the things, usually the application-level remote communication protocol will provide:

1, in order to avoid the direct flow of such trouble, to provide a more user-friendly or fitting language standard transmission format;

2, the realization of network communication mechanism, is for you to complete the transfer format into a stream, through some kind of transmission protocol to the remote computer, the remote computer after receiving the stream into the transmission format, and to store or in some way notify the remote computer.

So when learning the application-level remote communication protocol, we can take these questions to learn:

1. What is the standard format for transmission?

2, how to convert the request into a stream of transmission?

3, how to receive and process flow?

4, transmission protocol is?

However, the application-level remote communication protocol does not make much of an improvement on the transport protocol, mainly in the flow operation aspect, lets the application layer generate the flow and the processing flow the process to be more fit to use the language or the standard, as far as the transport protocol is usually optional, in the Java domain well-known has: RMI, XML-RPC , Binary-rpc, SOAP, CORBA, and JMS to specifically look at the application-level protocols for these remote communications:

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

Um.

RMI is a typical Java-Custom remote communication protocol, and we all know that in a single VM we can communicate by simply calling Java object instance, and if that's the best way to do it in a remote communication, This mechanism of remote communication becomes RPC (remote Procedure call), and RMI was born to this goal.

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.