---
title: "IDL and CORBA RMI with services"
subject: "Distributed System"
chapter: 4
key: "semester_7/distributed_system:idl-corba-rmi"
source: https://www.bctengineer.com/q/semester_7/distributed_system/idl-corba-rmi
site: BCT Engineering
---

# IDL and CORBA RMI with services

Distributed System · Chapter 4: Distributed Heterogeneous Applications and CORBA

- Asked in: 2069 Chaitra, 2+4 marks
- Video: [8.2 Introduction to CORBA | RMI vs CORBA | CORBA Architecture | Interface Definition Language (IDL)](https://www.youtube.com/watch?v=a0Qvny1ctSI) — Diwash Dahal
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/idl-corba-rmi
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-4

## Question

What is IDL? Explain CORBA RMI with its services.

## Short answer

IDL (Interface Definition Language) is a language-neutral notation that describes object interfaces (operations, parameters, types) without implementation. CORBA RMI uses IDL-generated stubs and skeletons: the client obtains an object reference (IOR), the stub marshals arguments in CDR format, the ORB sends a GIOP/IIOP request to the server, where the Object Adapter and skeleton invoke the servant. Key services include Naming, Trading, Event, Transaction, and Security.

## Answer

#### IDL
**Interface Definition Language (IDL)** is a language-neutral, purely declarative notation used by CORBA to define the interface of an object: its operations, parameters, data types, attributes and exceptions. It contains no implementation. An IDL compiler maps it to a language (C++, Java, etc.) and generates the client stub and server skeleton.

```text
module Bank {
  exception Insufficient {};
  interface Account {
    float balance();
    void deposit(in float amt);
    void withdraw(in float amt) raises (Insufficient);
  };
};
```

#### CORBA RMI
CORBA RMI lets a client invoke a method on a remote object, possibly in another language, as if it were local. Steps:
1. Define the interface in IDL and compile it to get stub and skeleton.
2. The client obtains an object reference (IOR) from the Naming service.
3. It calls the stub, which marshals the arguments in CDR format.
4. The ORB sends a GIOP/IIOP request to the server ORB.
5. The Object Adapter finds the servant and the skeleton unmarshals and invokes the method.
6. The result or exception returns the same way.

Invocation is static (stub) or dynamic (DII/DSI), and can be synchronous, one-way or deferred.

#### Services
Naming (find references), Trading, Event/Notification, Life cycle, Persistence, Transaction, Concurrency control, Security and Query services support the RMI by locating objects, managing their state and securing the calls.

## Check yourself

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

1. What is IDL?
   A. Implementation language
   B. A language-neutral declarative notation for interfaces with no implementation
   C. A network protocol
   D. A database
   Answer: B. An IDL compiler generates stubs and skeletons. (Key point: IDL)

2. How does the client obtain an object reference in CORBA RMI?
   A. From the Naming service (IOR)
   B. From the skeleton
   C. From a file transfer
   D. By guessing
   Answer: A. Then it calls the stub. (Key point: Getting reference)

3. In which format does the stub marshal arguments?
   A. XML
   B. JSON
   C. CDR
   D. ASCII only
   Answer: C. The ORB sends it as GIOP/IIOP. (Key point: Marshalling)

## Related in Distributed System

- [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
- [IDL, middleware and RMI approach](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aidl-middleware-rmi) — Distributed System, chapter 2
- [Importance of IDL in RMI; static RMI](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Armi-idl-static-rmi) — Distributed System, chapter 2
- [Short note: CORBA components for RMI](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Acorba-rmi-component-note) — Distributed System, chapter 4
- [CORBA invocation methods and services](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Acorba-invocation-services) — Distributed System, chapter 4, asked 3×
- [JINI goals, CORBA services, OS support](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aos-support-jini-corba) — Distributed System, chapter 3
