The relationship between RPC and Socket,rmi and RPC

Source: Internet
Author: User

The relationship between RPC and RMI in remote communication mechanism

http://blog.csdn.net/zolalad/article/details/25161133

1.RPC

RPC(remote Procedure call Protocol) remoting protocol, a protocol that requests services from a remote computer program over a network without needing to know the underlying network technology. RPC does not depend on the specific network transport Protocol, TCP, UDP and so on can be. Due to the variety of transformations and differences in detail, the corresponding RPC also derives a variety of remote process communication protocols. RPC is a cross-language communication standard, and both sun and Microsoft have implementations, such as RMI, which can be seen as the Java version of Sun on RPC (Implementation), and Microsoft's DCOM is built on the ORPC protocol. Word, RPC is a protocol, and both Sun RMI and Microsoft DCOM are different implementations of the protocol, both of which provide programmers with program interfaces (APIs) to apply PRC technology.

Personal Summary: RPC protocol Implementation Framework such as RMI should be through the socket interface to use the TCP/IP protocol to achieve network communication. Other common application layer protocols include FTP, HTTP, TELNET, SMTP, and so on, through the socket interface to use the TCP/IP protocol to achieve network communication.

A socket is an intermediate software abstraction layer that the application layer communicates with the TCP/IP protocol family, which is a set of interfaces . In design mode, the socket is actually a façade mode (facade), it hides the complex TCP/IP protocol family behind the socket interface, for the user, a simple set of interfaces is all, let the socket to organize data to meet the specified protocol.

For more information about sockets, see: http://blog.csdn.net/zolalad/article/details/45599199

2. Java EE Project-using the JDK's own RPC implementation--rmi

       rmi is a group of Java advocates developing distributed Applications API . RMI defines a remote object using the Java language interface, which aggregates Java serialization and Java Remote Method Protocol (Java Protocol). Simply put, this makes the original program in the same operating system of the method call, into a different operating system method call between the program, because the Java EE is a distributed program platform, it is the RMI mechanism to implement the program components between different operating systems communication . For example, an EJB can invoke an EJB remote method on another machine on the web through RMI.
        rmi (Remote Method Invocation, Remote method Invocation) is implemented in Java in JDK1.1, which greatly enhances the ability of Java to develop distributed applications. Java as a rage network development language, its great power is reflected in its strong ability to develop distributed network applications, and RMI is to develop a pure Java network Distributed Application System, one of the core solutions. The actually RMI can be seen as the Java version of RPC (Implementation) . However, traditional RPC does not apply well to distributed object systems, while Java RMI supports program-level objects stored in different address spaces to communicate with each other, enabling seamless remote calls between remote objects.

RMI is currently communicating using the Java Remote Message Exchange protocol JRMP (Java remotes Messaging Protocol). JRMP is a protocol developed specifically for the remote objects of Java. Therefore, Java RMI has the advantage of "Write Once,run Anywhere" in Java and is a 100% pure Java Solution for distributed Application Systems . Applications developed with Java RMI can be deployed on any platform that supports the JRE (Java Run Environment Java, running environment). However, because JRMP is specifically designed for Java objects, RMI has insufficient support for application systems developed in non-Java languages. Cannot communicate with objects written in a non-Java language.

3. The principle of custom RPC implementation in Hadoop
As a basic platform for storage and services, Hadoop has a master/slave architecture inside it, and its internal communication and interaction with the client are essential. Hadoop implements an RPC implementation--rmi, which is implemented with the JDK itself, and implements a more efficient lightweight RPC based on the IPC model .

Reference:

The difference between 1.RPC,RMI,WEBSERVICE,JMS

Reference: HTTP://WWW.TUICOOL.COM/ARTICLES/2QAZQQ

RPC implementations in 2.Hadoop--Client communication components

Http://www.linuxidc.com/Linux/2012-02/54696.htm
Http://www.linuxidc.com/Linux/2012-02/54695.htm

The relationship between RPC and Socket,rmi and RPC

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.