| ★ wanayoo — archive 1999 http://java.sun.com/javaone/javaone97/java1-97-rmi.html | Nouvelle recherche | Portail wanayoo |
|
Remote Method Invocation ArrivesRMI enables distributed Java-to-Java applications
|
|
|||
|
By Phil Inje Chang, JavaWorld San Francisco (April 7, 1997) -- Available in pre-release since last August, Remote Method Invocation, or RMI, is now officially in JDK 1.1. On the third day of JavaOne, Ann Wollrath and Jim Waldo, senior staff engineers at JavaSoft, spoke about the strengths of this new way to bring active content to distributed computing. Positioned as a natural outgrowth of RPC (Remote Procedure Calls), RMI provides the means for Java-to-Java interaction. Wollrath and Waldo went as far as describing an evolutionary path from procedural RPC to object-based ORBs to object-oriented Java RMI. ORBs (Object Request Brokers) are not fully object-oriented because they do not support inheritance, and they perform type truncation of arguments and return values. RMI uses Object Serialization and dynamic downloading of code to marshal and unmarshal parameters and does not truncate types, supporting true object-oriented polymorphism. RMI, however, is strictly for Java-to-Java communication, complementing CORBA (Common Object Request Broker Architecture), which can communicate among multiple languages. RMI takes its place firmly on top of the Java VM, leveraging the strengths of code portability and security as principal reasons for an all-Java environment. Perhaps the clearest way to envision RMI is as a collection of layers just underneath a developer's code and above the Java VM. These layers consist of a stub/skeleton, remote references, and transport/distributed garbage collection. Incoming invocations come from other Java objects and pass through the VM. Similarly, return values pass from this object through the VM to other objects. Because RMI is dynamically extensible, it is ideal for command objects, strategy objects, and agents. Objects can be of a core class, a JavaBean, or a custom object, and can communicate in client/server, peer-to-peer, or behavior- based fashion (as with agents). Client objects can call methods in remote server objects, which in turn can be the clients of other remote objects. Sample applications are a chess-game server employing player-defined strategies, and a stock-trading application via "stock agents." It's clear that all kinds of interesting applications can now be completely distributed and written with standard object-oriented design patterns.
Future directions for RMI include persistent remote references,
use of secure transports, multicast remote references,
composable and user-defined reference types, and of course,
ever-better performance.
Resources
|
|||||