Skip to main content

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

PointRPCRMI
ParadigmProcedure orientedObject oriented
What is calledA remote procedure/functionA method of a remote object
ParametersOrdinary data, passed by value (structures)Objects too, passed by value (serialised) or by remote reference
Object identityNoneRemote object references identify objects
StateProcedures usually without object stateMethods work on the state of an object
LanguageUsually language independent (C, XDR)Java RMI is Java only; CORBA is language independent
InterfaceIDL such as Sun XDR/rpcgenJava interface or CORBA IDL
Garbage collectionNot applicableDistributed garbage collection of remote objects
Polymorphism, inheritanceNot supportedSupported
UseProcedural client-serverComplex 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:

  1. 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).
  2. Standard data representation (XDR/NDR): marshalling hides differences in byte order and formats of heterogeneous machines.
  3. 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.
  4. Pointer and structure handling: complex data is copied by value (deep copy) so pointers and linked structures can be passed.
  5. 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).
  6. Threads and asynchronous RPC: many calls are served at once; the client can continue without waiting.
  7. Security services: authentication and encrypted calls are integrated (Kerberos).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Distributed System chapter 2 questions →