distributedsystem/microservice/grpc

Procedure Calls

What is IDL? - Stack Overflow
Interface description language - Wikiwand

An IDL is used to set up communications between clients servers in RPC.

Basically, you use an IDL to specify the interface between client and server so that the RPC mechanism can create the code stubs required to call functions across the network.

Features

  • Language Neutrality: Allows components written in different programming languages to communicate seamlessly.
  • Serialization Support: Provides structure for converting complex data types into a format suitable for transmission (e.g., binary or JSON).
  • Communication Abstraction: Hides the underlying network protocol details from developers.

How IDL Works

  • Definition of Interfaces: The developer writes an IDL file specifying functions, methods, data types, and communication protocols.
  • Code Generation: A compiler or tool generates stubs (client-side code) and skeletons (server-side code) in the target programming languages.
  • Communication: Applications use these stubs/skeletons to serialize data, send/receive requests, and invoke methods over a network.

IDL Implementation

  1. Protobuf for gRPC
  2. Apache Thrift
  3. CORBA IDL for CORBA (Common Object Request Broker Architecture)
  4. Web Services (WSDL for SOAP, OpenAPI for REST)

Cap'n Proto

Cap’n Proto is a high-performance data interchange format and RPC (Remote Procedure Call) system designed for speed, efficiency, and ease of use. It was developed as an alternative to serialization systems like Protocol Buffers (Protobuf) and Apache Thrift, with a focus on eliminating unnecessary overhead and making data transmission as fast as possible.