- Distributed Computing in Java 9
- Raja Malleswara Rao Pattamsetti
- 321字
- 2021-07-02 21:02:33
Key terminologies of RMI
The following are some of the important terminologies used in a Remote Method Invocation.
Remote object: This is an object in a specific JVM whose methods are exposed so they could be invoked by another program deployed on a different JVM.
Remote interface: This is a Java interface that defines the methods that exist in a remote object. A remote object can implement more than one remote interface to adopt multiple remote interface behaviors.
RMI: This is a way of invoking a remote object's methods with the help of a remote interface. It can be carried with a syntax that is similar to the local method invocation.
Stub: This is a Java object that acts as an entry point for the client object to route any outgoing requests. It exists on the client JVM and represents the handle to the remote object. If any object invokes a method on the stub object, the stub establishes RMI by following these steps:
- It initiates a connection to the remote machine JVM.
- It marshals (write and transmit) the parameters passed to it via the remote JVM.
- It waits for a response from the remote object and unmarshals (read) the returned value or exception, then it responds to the caller with that value or exception.
Skeleton: This is an object that behaves like a gateway on the server side. It acts as a remote object with which the client objects interact through the stub. This means that any requests coming from the remote client are routed through it. If the skeleton receives a request, it establishes RMI through these steps:
- It reads the parameter sent to the remote method.
- It invokes the actual remote object method.
- It marshals (writes and transmits) the result back to the caller (stub).
The following diagram demonstrates RMI communication with stub and skeleton involved:

- C/C++算法從菜鳥到達人
- Programming ArcGIS 10.1 with Python Cookbook
- 用戶體驗可視化指南
- OpenGL Data Visualization Cookbook
- Web性能實戰
- Access 2010數據庫應用技術實驗指導與習題選解(第2版)
- Python大學實用教程
- Python物理建模初學者指南(第2版)
- 交互設計師成長手冊:從零開始學交互
- Spring Data JPA從入門到精通
- Test-Driven iOS Development with Swift
- CryENGINE Game Programming with C++,C#,and Lua
- Puppet Cookbook(Third Edition)
- Mastering PostgreSQL 11(Second Edition)
- 軟件定義存儲:原理、實踐與生態