- 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:

- Android Jetpack開發(fā):原理解析與應(yīng)用實(shí)戰(zhàn)
- ASP.NET MVC4框架揭秘
- 摩登創(chuàng)客:與智能手機(jī)和平板電腦共舞
- Learn WebAssembly
- 用Python實(shí)現(xiàn)深度學(xué)習(xí)框架
- 微信小程序項(xiàng)目開發(fā)實(shí)戰(zhàn)
- Learning Hunk
- MATLAB 2020從入門到精通
- Scala Reactive Programming
- Learning Material Design
- Deep Learning for Natural Language Processing
- R語(yǔ)言實(shí)戰(zhàn)(第2版)
- C#網(wǎng)絡(luò)編程高級(jí)篇之網(wǎng)頁(yè)游戲輔助程序設(shè)計(jì)
- 3D Printing Designs:Design an SD Card Holder
- HTML5+jQuery Mobile移動(dòng)應(yīng)用開發(fā)