---
title: "Distributed objects and communication"
subject: "Distributed System"
chapter: 2
key: "semester_7/distributed_system:distributed-objects-communication"
source: https://www.bctengineer.com/q/semester_7/distributed_system/distributed-objects-communication
site: BCT Engineering
---

# Distributed objects and communication

Distributed System · Chapter 2: Distributed Objects and File System

- Asked in: 2076 Asoj; Model question (asked 2 times)
- Video: [3.17 Communication Distributed Object Based Systems](https://www.youtube.com/watch?v=g3daKYO5GSQ) — OU Education
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/distributed-objects-communication
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-2

## Question

Define distributed objects and explain communication between distributed objects.

## 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.

## Answer

#### 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.

1. **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.
2. **Remote procedure call (RPC):** procedural communication through stubs, used with non-object servers.
3. **Message passing:** direct send/receive messages (sockets, message queues).
4. **Event notification (publish-subscribe):** an object of interest publishes events and subscribers get notification asynchronously (Jini distributed events, CORBA event service).
5. **Group (multicast) communication** for replicated objects.

```text
 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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How is the state of a distributed object accessed?
   A. Only through methods in its remote interface, using a remote object reference
   B. Directly by any process through shared memory
   C. Through the proxy's private fields
   D. By reading its disk file
   Answer: A. State is encapsulated behind the remote interface. (Key point: Distributed object)

2. What does a remote object reference contain?
   A. Only the object's name
   B. Network address, object id and interface
   C. Only the IP address
   D. The object's source code
   Answer: B. It uniquely identifies the object and can be passed as parameter or result. (Key point: Remote reference)

3. How does event notification (publish-subscribe) differ from RMI?
   A. The client blocks waiting for a reply
   B. It uses stubs and skeletons only
   C. Subscribers are notified asynchronously when the object of interest publishes an event
   D. It cannot involve more than one receiver
   Answer: C. Events are pushed asynchronously rather than invoked by request-reply. (Key point: Event notification)

4. Which call semantics does RMI request-reply typically use, as in Java RMI and CORBA?
   A. Maybe
   B. At-least-once
   C. Exactly-once
   D. At-most-once
   Answer: D. A request id and reply history filter duplicates. (Key point: Invocation semantics)

## Related in Distributed System

- [Event notification among distributed objects](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aevent-notification-architecture) — Distributed System, chapter 2
- [DFS; RMI communication between objects](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Armi-dfs-comm) — Distributed System, chapter 2
- [Object communication; RPC vs RMI](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aobjects-communicate-rpc-rmi) — Distributed System, chapter 2
- [RPC and its communication semantics](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Arpc-semantics) — Distributed System, chapter 2, asked 3×
- [Short note: Reliable group communication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Areliable-group-comm-note) — Distributed System, chapter 9
- [Reliable client-server communication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Areliable-client-server) — Distributed System, chapter 9

## Related in other subjects

- [Lumped vs distributed analysis, applications, protocols](https://www.bctengineer.com/question.md?key=semester_7%2Frf_and_microwave_engineering%3Alumped-distributed-protocols) — RF and Microwave Engineering, chapter 1
