---
title: "Event notification among distributed objects"
subject: "Distributed System"
chapter: 2
key: "semester_7/distributed_system:event-notification-architecture"
source: https://www.bctengineer.com/q/semester_7/distributed_system/event-notification-architecture
site: BCT Engineering
---

# Event notification among distributed objects

Distributed System · Chapter 2: Distributed Objects and File System

- Asked in: Model question
- Video: [EVENTS AND NOTIFICATIONS IN DISTRIBUTED SYSTEMS-EXPLAINED SIMPLY](https://www.youtube.com/watch?v=O4kLi_-iJ0o) — kerala 111
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/event-notification-architecture
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-2

## Question

Define distributed objects. What are the needs of event notification during the communication among distributed objects? Explain the distributed event notification architecture in detail.

## Short answer

Distributed objects encapsulate state accessible via remote interface methods. Event notification enables asynchronous, loosely-coupled reactions to changes and one-to-many delivery without polling. The architecture uses event generators, an intermediate event service for filtering and routing, and subscribers that register for notifications via RMI in a push or pull model.

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

#### Need of event notification
- Objects must **react to changes** in other objects (a stock price changes, a document is edited, a sensor value passes a threshold) without constant polling, which wastes network and CPU.
- It gives **asynchronous, loosely coupled** communication: publishers and subscribers need not know each other.
- It supports **one-to-many** delivery to many subscribers at once.
- It supports **heterogeneous** systems, and scales better than polling.
- Typical uses: collaborative editing, stock-trading, monitoring, mobile and ubiquitous computing, alarms.

#### Distributed event notification architecture
```text
 Event generators          Event service         Subscribers
 (objects of interest)  +-----------------+    +-------------+
 [Obj A] --event-->     | filter, route,  | -->| Observer 1  |
 [Obj B] --event-->     | store (mailbox) | -->| Observer 2  |
                        +-----------------+    +-------------+
        <---- register / unregister (subscribe) ----
```
**Components**
1. **Event generators (objects of interest):** objects whose state change produces an event.
2. **Events / notifications:** objects holding type, source, time and attributes.
3. **Subscribers (listeners):** register their interest and receive notifications by remote method call.
4. **Observers / event service (notifier):** an intermediate object which separates generator from subscriber; can forward, filter by pattern, and store events in a mailbox for later delivery.

**Operation**
1. The subscriber registers with the event generator (or event service) for given event types. A lease (time limit) may be given.
2. An event occurs in the generator; a notification object is created.
3. The generator (or event service) invokes `notify` on every registered subscriber by RMI.
4. The subscriber acts on it; it unsubscribes when it no longer needs the events or lets its lease expire.

Models: *push* (the generator sends events) and *pull* (the subscriber asks for events). Examples: Jini distributed event specification, CORBA Event/Notification Service.

## Check yourself

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

1. What identifies a remote object so it can be passed as a parameter?
   A. The client's process id
   B. Its local memory pointer
   C. Only its class name
   D. A unique remote object reference (address, object id, interface)
   Answer: D. Remote references are unique and can be passed as parameters or results. (Key point: Distributed object)

2. Why is event notification needed instead of polling?
   A. Events remove all subscribers
   B. Polling is always faster
   C. Polling wastes network and CPU; events give asynchronous, loosely coupled one-to-many delivery
   D. Events are required to make objects synchronous
   Answer: C. Publishers and subscribers need not know each other and events scale better. (Key point: Need for events)

3. What does an intermediate event service (observer) do?
   A. Deletes subscribers' registrations
   B. Separates generator from subscriber; can forward, filter by pattern and store events in a mailbox
   C. Generates the events itself
   D. Compiles the notification interface
   Answer: B. It decouples the parties and provides forwarding, filtering and storage. (Key point: Event service)

4. What happens when an event occurs?
   A. A notification object is created and notify is invoked on each registered subscriber by RMI
   B. The subscriber polls the generator
   C. The lease is renewed automatically with no notification
   D. The generator stops running
   Answer: A. Subscribers register first, then receive notify calls on events. (Key point: Operation)

## Related in Distributed System

- [RMI functionalities; event notification](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Armi-functionalities-events) — Distributed System, chapter 2
- [Distributed objects and communication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Adistributed-objects-communication) — Distributed System, chapter 2, asked 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
- [DFS; RMI communication between objects](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Armi-dfs-comm) — Distributed System, chapter 2
- [Event, causal and global ordering](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aevent-causal-global-ordering) — Distributed System, chapter 5

## 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
- [Communication protocol and OSI architecture](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Aprotocol-osi-architecture) — Telecommunications, chapter 8
- [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
