What is the difference between RMI and JRMP?

3

I only know the RMI ... JRMP is just a different way to call the RMI or is it another protocol?
In the case of JRMP being another protocol, what is its difference from RMI?

    
asked by anonymous 08.10.2016 / 18:12

1 answer

0

RMI

The Remote Method Invocation (RMI) is a programming interface that allows execution of RPC-style remote calls in applications built on Java . It is one of the approaches of the Java platform to provide the functionality of a distributed object platform. This distributed object system is part of the basic Java core since the JDK 1.1 version, with its API being specified through the java.rmi package and its subpackages.

By using the RMI architecture, it is possible for an active object in a Java virtual machine to interact with objects of other virtual machines Java , regardless of the location of those virtual machines.

JRMP

JRMP ( Java Remote Method Protocol ) is the specific protocol of Java technology to look at and refer to remote objects. It is a wire-level protocol running at a level below RMI (RMI) and over TCP / IP.

RMI System Software Layers

The implementation of RMI is essentially made up of three layers of abstraction. The Stub and Skeleton layers are below the developer's eyes. This layer intercepts client method calls so that the interface reference variable redirects these calls to the remote RMI service.

The next layer is the Remote Reference Layer . This layer knows how to interpret and manage referrals made from clients to remote service objects. The client connection to the server is Unicast (one-to-one).

The transport layer is based on the TCP/IP connections between machines on a network. Using this layering architecture, each layer could be easily improved or replaced without affecting the rest of the system. For example, the transport layer could be replaced by a layer that implements UDP / IP connections, without affecting the upper layers.

This layer deals directly with communication between the various JVMs, using TCP / IP. It is important to note that even though JVMs run on the same computer, RMI always uses TCP / IP communication. This means that it is always necessary to have a functional network interface to be able to use RMI (even though the client application and the server application running on the same computer). On the TCP / IP stack, RMI has a protocol called JRMP, which allows you to overcome some of the obstacles that can arise in TCP / IP network communication. For example, JRMP allows multiple TCP / IP connections to be multiplexed on a single TCP / IP connection over and above the constraints of using only one connection in some environments (eg certain browsers running RMI applets).


Java RMI is not exactly a transport protocol?

No. Java RMI is a set of APIs and a template for remote objects that allows developers to easily build distributed applications in Java. For example, it uses normal Java interfaces to define remote objects in a separate language such as IDL. Usually Java RMI uses a combination of Java serialization and Java Remote Method Protocol (JRMP) to convert the normal appearance of a method to a remote method invocation.

With Java RMI, JRMP will continue to support and enhance the native protocol for Java RMI.

What is a transport protocol?

A transport protocol defines a set of message formats that allow you to pass data over a network from one computer to another. Java RMI supports its own transport protocol (JRMP) and other regular industry protocols including IIOP.

See more at: Java: Remote Method Invocation

    
10.10.2016 / 03:26