Understanding the Differences between RMI-IIOP and RMI for Code Downloading in Java Objects
Remote Method Invocation (RMI) and RMI over Internet Inter-ORB Protocol (RMI-IIOP) are two communication protocols used in Java to enable distributed communication between objects. When it comes to supporting code downloading for Java objects sent by value across a connection, there are notable differences between the two:
- RMI:
- RMI-IIOP:
RMI allows Java objects to be passed by reference between different JVMs. When a remote object reference is passed, the client JVM is responsible for downloading the code for the object when needed. This means that the code must be present on the client side or a mechanism like codebase URL must be specified for the client to download the required classes.
RMI-IIOP is a variant of RMI that uses the Internet Inter-ORB Protocol (IIOP) for communication. In RMI-IIOP, Java objects are passed by value, which means that a copy of the object is sent across the connection. This eliminates the need for the client JVM to download the code for the object because the object itself is transmitted.
In summary, while RMI requires code downloading on the client side for objects passed by reference, RMI-IIOP sends objects by value, eliminating the need for code downloading. Understanding these differences is crucial when designing distributed systems using Java.
Please login or Register to submit your answer