Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is rmi in java

Shulou Source: shulou.com Published: 2022-05-31 11:03:32 09月23日 Update

This article mainly introduces the relevant knowledge of "what is rmi in java". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "what is rmi in java" can help you solve the problem.

RMI (Remote Method Invocation) model is a kind of distributed object application. Using RMI technology, an object in one JVM can call an object method in another JVM and get the result of the call. The other JVM here can be on the same computer or on a remote computer. Therefore, RMI means that you need a Server side and a Client side.

Introduction to RMI Port

The Server side usually creates an object and makes it remotely accessible.

This object is called a remote object.

The Server side needs to register that this object can be accessed remotely by Client.

The Client side calls the methods on the objects that can be accessed remotely, and the Client side can communicate with the Server side and transmit information to each other.

At this point, it is found that it is very convenient to use RMI to build a distributed application. Like RPC, it can communicate with each other between distributed applications, and even is very similar to the current micro-service idea.

Advantages and disadvantages of RMI

Advantages: the ability to avoid repeating wheels

Disadvantages: the call process is slow, and the process is unreliable, prone to unexpected errors, such as network errors.

This is the end of the content about "what is rmi in java". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Object distributed method knowledge process application industry computer error communication different practical between advantages and disadvantages creativity information content can make practical Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Huawei Linux vpn MySQL