- 2070 Chaitra · 2+6 marks
RPC vs RMI; modern RPC transparency
Short answer
RPC calls a remote procedure with ordinary data; RMI calls a method on a remote object with references and object state. Modern RPC maintains transparency through IDL-generated stubs, standard data representation, dynamic binding, deep-copying pointers, failure handling with at-most-once semantics, threads, and security services.
Differentiate between RPC and RMI. How does modern RPC maintain the transparency in distributed system?
RPC versus RMI
| Point | RPC | RMI |
|---|---|---|
| Paradigm | Procedure oriented | Object oriented |
| What is called | A remote procedure/function | A method of a remote object |
| Parameters | Ordinary data, passed by value (structures) | Objects too, passed by value (serialised) or by remote reference |
| Object identity | None | Remote object references identify objects |
| State | Procedures usually without object state | Methods work on the state of an object |
| Language | Usually language independent (C, XDR) | Java RMI is Java only; CORBA is language independent |
| Interface | IDL such as Sun XDR/rpcgen | Java interface or CORBA IDL |
| Garbage collection | Not applicable | Distributed garbage collection of remote objects |
| Polymorphism, inheritance | Not supported | Supported |
| Use | Procedural client-server | Complex distributed object applications |
How modern RPC maintains transparency
Conventional RPC gave only partial access transparency: the programmer had to call special library routines, remote calls could not use pointers or global variables, the call semantics differed from a local call, and failures were not handled. Modern RPC (DCE RPC, ONC+, Java) improves this:
- IDL and stub generator: an IDL compiler makes the client and server stubs automatically, so the remote call looks like a local call (access transparency).
- Standard data representation (XDR/NDR): marshalling hides differences in byte order and formats of heterogeneous machines.
- Dynamic binding and a naming/directory service: the client finds the server by a name at run time, giving location transparency, with replicated servers in a group.
- Pointer and structure handling: complex data is copied by value (deep copy) so pointers and linked structures can be passed.
- Failure handling: call semantics (at-most-once) with timeouts, retransmission and exceptions, so failures are reported in a similar way to local errors (failure transparency).
- Threads and asynchronous RPC: many calls are served at once; the client can continue without waiting.
- Security services: authentication and encrypted calls are integrated (Kerberos).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Access transparency and modern RPC · Distributed System, chapter 2
- Distributed object, IDL; RPC vs RMI · Distributed System, chapter 2
- Object communication; RPC vs RMI · Distributed System, chapter 2
- Compare RPC and RMI · Distributed System, chapter 2 · asked 2×
- Autonomous vs distributed system · Distributed System, chapter 1
- DS vs centralized; layers of transparency · Distributed System, chapter 1
- LTI system and closed loop in modern systems · Control Systems, chapter 1