Home > Java > javaTutorial > body text

What is rmi in java

WBOY
Release: 2023-04-18 22:34:01
forward
1164 people have browsed it

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

RMI port introduction

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

This object is called a remote object.

The server needs to register this object so that it can be accessed remotely by the client.

The client calls methods on objects that can be accessed remotely, and the client can communicate with the server and transfer information to each other.

Speaking of this, have you found that using RMI is very convenient when building a distributed application? Like RPC, it can realize mutual communication between distributed applications, and it is even very similar to the current microservice idea. .

Advantages and disadvantages of RMI

Advantages: It can avoid reinventing the wheel;

Disadvantages: The calling process is very slow, and the process is unreliable and prone to unpredictable occurrences Errors, such as network errors, etc.

The above is the detailed content of What is rmi in java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template