Defining an Interface Definition Language File

Let’s learn how to define an interface definition language file.

The gRPC service that we are developing is going to support the following functionality:

  • The server should return its date and time to the client.

  • The server should return a randomly generated password of a given length to the client.

  • The server should return random integers to the client.

Before we begin developing the gRPC client and server for our service, we need to define the IDL file. We need a separate GitHub repository to host the files related to the IDL file, which is going to be https://github.com/Educative-Content/protoapi.

The structure of the IDL file

Next, we are going to present the IDL file, which is called protoapi.proto:

Get hands-on with 1400+ tech skills courses.