4

Setting Up a Project

As the chapter title suggests, we are going to set up a gRPC project from scratch. We are first going to create our Protobuf schema as we are doing schema-driven development. Once the schema is created, we will generate Go code. Finally, we are going to write the templates for the server and client so that we can reuse them later in this book.

In this chapter, we’re going to cover the following main topics:

  • Common gRPC project architecture
  • Generating Go code out of a schema
  • Writing reusable server/client templates

Prerequisites

I assume that you already have protoc installed from the last chapter. If you do not, this is the right time to install it because without it, you will not benefit as much from this chapter.

Get gRPC Go for Professionals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.