---
title: "RMI functionalities; event notification"
subject: "Distributed System"
chapter: 2
key: "semester_7/distributed_system:rmi-functionalities-events"
source: https://www.bctengineer.com/q/semester_7/distributed_system/rmi-functionalities-events
site: BCT Engineering
---

# RMI functionalities; event notification

Distributed System · Chapter 2: Distributed Objects and File System

- Asked in: 2076 Chaitra, 3+5 marks
- Video: [1.17 Remote Method Invocation RMI](https://www.youtube.com/watch?v=aXjjQOLfPrI) — 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/rmi-functionalities-events
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-2

## Question

Discuss the functionalities provided by RMI software. How is the event and notification system implemented in distributed object based communication?

## Short answer

RMI provides remote invocation, proxy/skeleton generation, remote references, naming, parameter passing, request-reply semantics, distributed garbage collection, activation, security, and concurrency. Events use publish-subscribe: subscribers register with a generator, which calls their notify method by RMI when an event occurs; leases or event channels handle removal.

## Answer

#### Functionalities provided by RMI software
- **Remote invocation:** call methods of objects in other processes with the same syntax as local calls.
- **Proxy and skeleton generation:** marshalling, sending, dispatching.
- **Remote object references** and a remote reference module to map them.
- **Naming and binding:** a registry / naming service to look up objects by name.
- **Parameter passing:** by value (serialisation) or by remote reference; transfer of object state and class code (dynamic class loading).
- **Request-reply protocol with invocation semantics** (at-most-once), timeouts, exceptions.
- **Distributed garbage collection** of remote objects and **activation** of objects on demand.
- **Security** through a security manager and optional encrypted channels.
- **Concurrency:** server threads handle many calls at once.

#### Event and notification system
Events let objects react to changes in other objects without polling. It uses the **publish-subscribe** paradigm.

```text
 Object of interest -> Event service -> Subscriber A
 (publisher)           (notifier)    -> Subscriber B
        events (notifications), decoupled and asynchronous
```

**Roles**
- **Event generator (object of interest):** where an event (state change) happens.
- **Event / notification:** an object with data about the event (type, time, source).
- **Subscriber (observer):** registers interest and receives notifications.
- **Observer / event service (notifier):** forwarding, filtering, patterns and mailboxes between generators and subscribers.

**Implementation in distributed objects**
1. The subscriber (implementing a remote listener interface) calls `register` on the generator to subscribe to an event type.
2. When the event happens, the generator creates a notification and calls the subscriber's `notify` method by RMI.
3. The subscriber handles it. It can unsubscribe at any time.

In Jini the registration carries a *lease*, a time limit, so that dead subscribers are removed. In CORBA, the Event Service uses event channels (push and pull models).

## Check yourself

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

1. Which is a functionality provided by RMI software?
   A. Hardware clock synchronisation
   B. Distributed garbage collection of remote objects
   C. Disk partitioning
   D. Compiling programs to machine code
   Answer: B. RMI also gives remote invocation, naming, parameter passing, activation, security and concurrency. (Key point: RMI functionality)

2. Why are events and notifications used instead of polling?
   A. Objects react to changes in other objects without constantly checking, saving network and CPU
   B. They guarantee strict ordering of all messages
   C. They make objects tightly coupled
   D. They remove the need for subscribers
   Answer: A. Publish-subscribe is asynchronous and decoupled, avoiding wasteful polling. (Key point: Why events)

3. How does a subscriber start receiving events?
   A. It deletes the notification object
   B. It waits for the generator to find it by broadcast
   C. It calls notify on the generator
   D. It calls register on the event generator for an event type, implementing a remote listener interface
   Answer: D. The subscriber registers; later the generator calls the subscriber's notify method by RMI. (Key point: Subscription step)

4. What is the purpose of a lease in Jini event registration?
   A. To order events by priority
   B. To encrypt notifications
   C. A time limit on the registration so dead subscribers are removed
   D. To increase notification size
   Answer: C. Registrations expire unless renewed, which cleans up subscribers that have crashed. (Key point: Leases)

## 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
- [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
- [Object communication; RPC vs RMI](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aobjects-communicate-rpc-rmi) — 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
- [Short note: JINI distributed event spec](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Ajini-event-note) — Distributed System, chapter 2
- [IDL, middleware and RMI approach](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aidl-middleware-rmi) — Distributed System, chapter 2

## Related in other subjects

- [Distributed object versus multiprocessor architecture](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Adistributed-object-vs-multiprocessor) — Software Engineering, chapter 3
- [Client-server versus distributed object architecture](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Aclient-server-vs-distributed-object) — Software Engineering, chapter 3
- [Event management system summary and class diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aoems-executive-summary-class-diagram) — Object Oriented Analysis and Design, chapter 2
- [Short note: component-based software engineering](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Acbse-note) — Software Engineering, chapter 6
