- Asked 2/15
- 2076 Asoj
- Model question
Distributed objects and communication
Short answer
Distributed objects encapsulate state and offer methods via a remote interface with unique references. Communication occurs through RMI using client-side proxy and server-side skeleton that marshal/unmarshal parameters, with at-most-once semantics; other forms include RPC, messaging, and publish-subscribe events.
Define distributed objects and explain communication between distributed objects.
Distributed objects
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.
Parts of the model: remote interface (set of remotely callable methods), remote object reference, proxy at the client, skeleton and dispatcher at the server, and remote reference module. Local calls are made as usual; invocations of remote objects use RMI.
Communication between distributed objects
Distributed objects communicate in these ways.
- Remote method invocation (RMI): a client holding a remote reference calls a method through a proxy; the skeleton/dispatcher at the server calls the object. Request-reply protocol with call semantics (at-most-once), as in Java RMI and CORBA.
- Remote procedure call (RPC): procedural communication through stubs, used with non-object servers.
- Message passing: direct send/receive messages (sockets, message queues).
- Event notification (publish-subscribe): an object of interest publishes events and subscribers get notification asynchronously (Jini distributed events, CORBA event service).
- Group (multicast) communication for replicated objects.
Client obj -> Proxy -> Request ----> Skeleton -> Remote obj
<- <- Reply <----
Marshalling converts arguments and results to a common external form (CDR in CORBA, serialisation in Java).
Key issues: invocation semantics (maybe, at-least-once, at-most-once), failures (exceptions such as RemoteException), parameter passing (by value for serialisable objects, by reference for remote objects) and binding through a naming service/registry.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Event notification among distributed objects · Distributed System, chapter 2
- DFS; RMI communication between objects · Distributed System, chapter 2
- Object communication; RPC vs RMI · Distributed System, chapter 2
- RPC and its communication semantics · Distributed System, chapter 2 · asked 3×
- Short note: Reliable group communication · Distributed System, chapter 9
- Reliable client-server communication · Distributed System, chapter 9
- Lumped vs distributed analysis, applications, protocols · RF and Microwave Engineering, chapter 1