官术网_书友最值得收藏!

What is RMI?

RMI is a Java-specific object-oriented extension of the Remote Procedure Call (RPC). It provides a mechanism to create Java-based distributed applications. It allows an object in one Java Virtual Machine (JVM) to interact with the object in another JVM by invoking the methods in that object. This is why an application built with an RMI is considered an application that could run across multiple JVMs.

RMI provides communication between applications that are deployed on different servers and connected remotely using objects called stub and skeleton. This communication architecture makes a distributed application seem like a group of objects communicating across a remote connection. These objects are encapsulated by exposing an interface, which helps access the private state and behavior of an object through its methods.

The following diagram shows how RMI happens between the RMI client and RMI server with the help of the RMI registry:

RMI REGISTRY is a remote object registry, a Bootstrap naming service, that is used by RMI SERVER on the same host to bind remote objects to names. Clients on local and remote hosts then look up the remote objects and make remote method invocations.

The following are some of the design considerations of applications built with an RMI:

  • Seamless method invocation on objects created across multiple JVMs
  • Ensuring the remote method invocation integrates easily with general programming logic with no external IDL while retaining most of Java's object semantics
  • Setting up the ability to distinguish between a distributed and local object model
  • Assisting in building reliable applications while maintaining Java's safety and security
  • Extending support to multiple transport protocols, various reference semantics, such as persistence and lazy activation, and various invocation mechanisms
  • Handling issues such as running in different memory spaces, parameter passing, data binding, and other failures of RPC
  • Handling any additional problems, such as distributed garbage collection and distributed class loading
主站蜘蛛池模板: 三原县| 布拖县| 晋城| 施秉县| 宁武县| 济南市| 陕西省| 新郑市| 石渠县| 定兴县| 牙克石市| 临漳县| 繁峙县| 门源| 玉屏| 库伦旗| 聂荣县| 三亚市| 南雄市| 营口市| 连州市| 米泉市| 马龙县| 永年县| 漳平市| 玉屏| 江山市| 农安县| 佛冈县| 南开区| 锡林浩特市| 昭苏县| 黄浦区| 吴川市| 萝北县| 丽水市| 牙克石市| 峡江县| 葫芦岛市| 宜州市| 盈江县|