---
title: "Short note: IDL"
subject: "Distributed System"
chapter: 4
key: "semester_7/distributed_system:idl-note"
source: https://www.bctengineer.com/q/semester_7/distributed_system/idl-note
site: BCT Engineering
---

# Short note: IDL

Distributed System · Chapter 4: Distributed Heterogeneous Applications and CORBA

- Asked in: 2074 Chaitra, 2 marks
- Video: [CORBA Explained Simply | ORB, IDL, Stubs–Skeletons & IIOP | Distributed Systems | Learn With Surya](https://www.youtube.com/watch?v=-9pSavDeEM0) — Learn With Surendra
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/idl-note
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-4

## Question

Write a short note on IDL (Interface Definition Language).

## Short answer

IDL (Interface Definition Language) is a language-independent notation that specifies a remote object’s interface — operations, parameters (in, out, inout), attributes, and exceptions — without implementation details. An IDL compiler generates client stubs and server skeletons for a target language, enabling interoperability between clients and servers written in different languages (e.g., C++ client, Java server).

## Answer

**Interface Definition Language (IDL)** is a language-independent notation for describing the interface of a remote object or service: the operations it offers, their parameters (`in`, `out`, `inout`), return types, attributes and exceptions. It specifies *what* an object does, not how.

Key points:
- Used by CORBA (OMG IDL); similar languages exist for DCE RPC, Sun RPC (XDR `.x` files) and web services (WSDL).
- An **IDL compiler** maps the interface into a programming language and generates the client **stub** and server **skeleton**, which handle marshalling.
- Supports modules, interfaces, inheritance, basic types, structs, sequences, arrays and exceptions.
- Enables interoperability between a Java client and a C++ server, since both are generated from the same definition.

Example:
```text
interface Calc {
  long add(in long a, in long b);
};
```

## Check yourself

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

1. What does an IDL specify about a remote object?
   A. The operations, parameters, return types and exceptions it offers, not how they are implemented
   B. The algorithm used to implement each operation
   C. The programming language the server must use
   D. The network protocol bytes used on the wire
   Answer: A. IDL describes what an object does (its interface), not how it does it. (Key point: What IDL describes)

2. What does an IDL compiler generate from an interface definition?
   A. The ORB and the naming service
   B. Client stub and server skeleton in the chosen programming language
   C. The servant implementation code
   D. The interface repository entries only
   Answer: B. The compiler maps the interface to a language and generates stub and skeleton that handle marshalling. (Key point: IDL compiler output)

3. Why can a Java client call a C++ server when both use the same IDL?
   A. Java and C++ share the same virtual machine
   B. The IDL converts C++ code into Java at runtime
   C. Both client and server code are generated from the same language-independent definition
   D. The client must be rewritten in C++
   Answer: C. A common IDL definition yields compatible stubs and skeletons in each language, giving interoperability. (Key point: Language independence)

## Related in other subjects

- [Marina class diagram implementation code](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Amarina-class-diagram-implementation-code) — Object Oriented Analysis and Design, chapter 4
- [Regular expression and FSA: at least three b's](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Afsa-at-least-three-b) — Discrete Structure, chapter 2
