Book Image

gRPC Go for Professionals

By : Clément Jean
Book Image

gRPC Go for Professionals

By: Clément Jean

Overview of this book

In recent years, the popularity of microservice architecture has surged, bringing forth a new set of requirements. Among these, efficient communication between the different services takes center stage, and that's where gRPC shines. This book will take you through creating gRPC servers and clients in an efficient, secure, and scalable way. However, communication is just one aspect of microservices, so this book goes beyond that to show you how to deploy your application on Kubernetes and configure other tools that are needed for making your application more resilient. With these tools at your disposal, you’ll be ready to get started with using gRPC in a microservice architecture. In gRPC Go for Professionals, you'll explore core concepts such as message transmission and the role of Protobuf in serialization and deserialization. Through a step-by-step implementation of a TODO list API, you’ll see the different features of gRPC in action. You’ll then learn different approaches for testing your services and debugging your API endpoints. Finally, you’ll get to grips with deploying the application services via Docker images and Kubernetes.
Table of Contents (13 chapters)

Understanding HTTP/2

If you are reading this book, I’m going to assume that you have familiarity with HTTP/1.1 or that at least you have a sense of how to make traditional HTTP API calls over the network. I guess so because most of the APIs that we interact with, as developers, have concepts that were brought about by this protocol. I’m talking about concepts such as headers, which can provide metadata for a call; the body, which contains the main data; and actions such as GET, POST, UPDATE, and so on, which define what you intend to do with the data in the body.

HTTP/2 still has all of these concepts but improves efficiency, security, and usability in a few ways. The first advantage of HTTP/2 over plain old HTTP/1.1 is the compression down to binary. Before HTTP/2, everything sent over the network was pure text and it was up to the user to compress it or not. With version 2, every part of the HTTP semantic is translated down to binary, thus making it faster for computers...