Chapter 4. gRPC basics
To get started with gRPC, you’ll need to know how to do a few things:
- Define an RPC interface: a service in a
.proto
file. - Create an implementation of that RPC interface.
- Expose the service by creating a gRPC server and registering your service implementation with it.
- Create a gRPC client and connect it to a server.
- Create stubs that use the gRPC client.
- Use the stub to send RPC requests to the server.
- Profit!
In this chapter we will guide you through these exact steps. Along the way, we’ll cover basic error handling in both the server and the client. And you’ll also learn about gRPC metadata and how to use it.