- 2074 Asoj · 3+5 marks
Distributed object, IDL; RPC vs RMI
Short answer
A distributed object exposes methods callable from other processes via a remote interface and unique reference. IDL is a language-neutral interface specification from which stubs and skeletons are generated. RPC uses client/server stubs around a procedure; RMI uses proxy, remote reference module, dispatcher, skeleton, and registry around a remote object.
Define distributed object and IDL. Compare RPC and RMI architecture.
Distributed object
A distributed object is an object whose methods can be invoked by processes on other computers. Its state is encapsulated and is accessible only through methods defined in a remote interface, and each remote object has a unique remote object reference (network address, object id, interface) that can be passed as a parameter or result. Examples are Java RMI remote objects and CORBA objects.
IDL
An Interface Definition Language (IDL) is a language-neutral notation that specifies the operations (names, parameter and return types, exceptions) that a remote object or server offers, without implementation. An IDL compiler generates the client stub/proxy and server skeleton in the chosen programming language (CORBA IDL, Sun XDR/rpcgen, Java remote interface).
Example (CORBA IDL):
interface Account {
void deposit(in float amount);
float getBalance();
};
Comparison of RPC and RMI architecture
RPC architecture: client program calls client stub, which marshals and sends through the RPC runtime to the server stub, which calls the server procedure. Only stubs exist; binding is to a server (program/procedure number) through a port mapper.
RMI architecture: client object calls a proxy, a remote reference module maps references, and the communication module sends the request; at the server the dispatcher selects the skeleton, which calls the remote object. A registry binds names to remote object references.
| 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 |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Object communication; RPC vs RMI · Distributed System, chapter 2
- Compare RPC and RMI · Distributed System, chapter 2 · asked 2×
- RPC vs RMI; modern RPC transparency · Distributed System, chapter 2
- IDL, middleware and RMI approach · Distributed System, chapter 2
- Importance of IDL in RMI; static RMI · Distributed System, chapter 2
- IDL and CORBA RMI with services · Distributed System, chapter 4
- Client-server versus distributed object architecture · Software Engineering, chapter 3
- Distributed object versus multiprocessor architecture · Software Engineering, chapter 3
- Compare procedural and object oriented programming · Object Oriented Programming, chapter 1
- Compare RISC and CISC architecture · Microprocessor, chapter 6 · asked 4×