---
title: "DFS; RMI communication between objects"
subject: "Distributed System"
chapter: 2
key: "semester_7/distributed_system:rmi-dfs-comm"
source: https://www.bctengineer.com/q/semester_7/distributed_system/rmi-dfs-comm
site: BCT Engineering
---

# DFS; RMI communication between objects

Distributed System · Chapter 2: Distributed Objects and File System

- Asked in: 2071 Chaitra, 2+6 marks
- Video: [REMOTE METHOD INVOCATION(RMI) IN DISTRIBUTED SYSTEM #ioe #thapathali #distributedsystem #rmi](https://www.youtube.com/watch?v=tTEMZwNQVTI) — Easy Explanation
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/rmi-dfs-comm
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-2

## Question

Define DFS. How does RMI perform communication between distributed objects? Explain.

## Short answer

A DFS stores files on network servers and provides transparent shared access like local disks. RMI communication uses a client proxy that marshals a method call, a communication module sending it to the server, and a dispatcher/skeleton that unmarshals, invokes the remote object, and returns the reply; a registry supplies remote references.

## Answer

#### Distributed file system (DFS)
A **distributed file system** stores files at servers on a network and gives clients transparent, shared access to them as though they were on local disks (for example NFS, AFS). It provides a common name space, location transparency, caching, replication and access control.

#### How RMI performs communication between distributed objects
**Remote Method Invocation (RMI)** is the object-oriented extension of RPC. An object in one process invokes a method of an object in another process (possibly on another host) through a *remote object reference*. In Java, RMI is built into the language; CORBA does the same for many languages.

**Architecture**

```text
 Client                         Server
 +-------------+                +-------------+
 | Client obj  |                | Remote obj  |
 | Proxy (stub)|                | Skeleton    |
 | Remote ref  |<-- network --->| Dispatcher  |
 | module      |                | Remote ref  |
 | Comm module |                | Comm module |
 +-------------+                +-------------+
        ^        Remote reference module: translates local <-> remote refs
        +--- Object registry / naming service: look up by name
```

- **Proxy (stub):** local representative of the remote object; marshals arguments and sends the request.
- **Skeleton / dispatcher:** unmarshals the request, selects the method and calls the object, then marshals the reply.
- **Remote reference module:** converts between local and remote object references.
- **Communication module:** carries request-reply messages with a chosen invocation semantics.
- **Registry / binder:** the client finds the remote object by name.

**Steps of an invocation**
1. The client calls a method on the **proxy** (looked up by name in the registry).
2. The proxy marshals the method id and arguments (objects serialised, remote objects as references) into a request message.
3. The **communication module** sends the request message to the server named in the remote object reference (address and object id).
4. The server's communication module gives it to the **dispatcher**, which selects the **skeleton** by the method id.
5. The skeleton unmarshals the arguments, invokes the method on the remote object, and marshals the result or exception.
6. The reply returns to the proxy, which unmarshals it and returns it to the client.

Java RMI uses at-most-once invocation semantics, achieved with timeouts, retransmission and duplicate filtering.

## Check yourself

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

1. What is a distributed file system?
   A. A system storing files at servers on a network and giving clients transparent shared access as if local
   B. A file system that exists only on a single local disk
   C. A system where each client sees only its own private files
   D. A protocol that only copies files by email
   Answer: A. A DFS offers transparent, shared access to files held on network servers (e.g. NFS, AFS). (Key point: DFS definition)

2. In RMI, what does the client-side proxy (stub) do?
   A. Converts remote references to local references
   B. Selects the method and invokes it on the object
   C. Stores the remote object permanently
   D. Acts as local representative of the remote object, marshalling arguments and sending the request
   Answer: D. The proxy marshals the method id and arguments; the skeleton/dispatcher at the server calls the method. (Key point: Proxy role)

3. What does the skeleton do at the server?
   A. Looks up the object name in the client's registry
   B. Only forwards messages without reading them
   C. Unmarshals the request, invokes the method on the remote object and marshals the reply
   D. Generates the IDL file
   Answer: C. The dispatcher picks the skeleton by method id; the skeleton unmarshals, calls the object and marshals the result. (Key point: Server side)

4. What invocation semantics does RMI normally provide?
   A. Always at-least-once with repeated execution
   B. At-most-once, using timeouts, retransmission and duplicate filtering
   C. Exactly-once with no failures possible
   D. Maybe semantics with no retransmission
   Answer: B. RMI normally gives at-most-once semantics through retransmission and duplicate filtering. (Key point: Invocation semantics)

## Related in Distributed System

- [Distributed objects and communication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Adistributed-objects-communication) — Distributed System, chapter 2, asked 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
- [Event notification among distributed objects](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aevent-notification-architecture) — Distributed System, chapter 2
- [Distributed object, IDL; RPC vs RMI](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aobject-idl-rpc-rmi) — Distributed System, chapter 2
- [RMI functionalities; event notification](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Armi-functionalities-events) — Distributed System, chapter 2
- [Compare RPC and RMI](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Arpc-vs-rmi) — Distributed System, chapter 2, asked 2×
