Java Remote Method Invocation (Java RMI)

Definition - What does Java Remote Method Invocation (Java RMI) mean?

Java Remote Method Invocation (Java RMI) is a mechanism that allows one Java Virtual Machine (JVM) running object to invoke methods on an object running in another JVM. It facilitates the remote calling of Java object methods and sharing of resources and services.

Techopedia explains Java Remote Method Invocation (Java RMI)

Java RMI is a technological mechanism in which a server and client communicate and pass information while relying on the Java Remote Method Protocol (JRMP). Java relies heavily on Java object serialization, which allows the transmission of objects as a stream. RMI also allows a client and server to load new object types dynamically, as required.

RMI uses layered architecture:

  • Application layer
  • Stub and skeleton layer
  • Remote reference layer
  • Transport layer
Java RMI has numerous advantages, as follows:

  • Portable to any JVM
  • Part of Java’s write once run anywhere (WORA) approach
  • Safe and secure: Uses built-in Java security mechanisms to facilitate system safety during user download implementations
  • Easy to write/Easy to maintain: Facilitates write remote Java servers and Java clients that access those servers

Consider this scenario: User A creates a class, which has methods that provide a specific service. User B wants to user A's service. Through Java RMI, user B is able to invoke the object's method. User A places the service in the registry. User B is unaware of the service location, so it invokes the RMI registry. The registry then locates the service, which invokes the method.

Share this:

Connect with us

Email Newsletter

Join thousands of others with our weekly newsletter

The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.