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)
10
Epilogue

Quiz

  1. What is the number 32 representing in the int32 scalar type?
    1. The number of bits the serialized data will be stored in
    2. The range of numbers that can fit into the scalar type
    3. Whether the type can accept negative numbers or not
  2. What is varint encoding doing?
    1. Compressing data in such a way that a smaller number of bytes will be required for serializing data
    2. Turning every negative number into positive numbers
  3. What is ZigZag encoding doing?
    1. Compressing data in such a way that a smaller number of bytes will be required for serializing data
    2. Turning every negative number into a positive number
  4. In the following code, what is the = 1 syntax and what is it used for?
    uint64 ids = 1;
    1. This is assigning the value 1 to a field
    2. 1 is an identifier that has no other purpose than helping developers
    3. 1 is an identifier that is helping the compiler know into which field to deserialize the binary data.
  5. What is a message?
    1. An object that contains fields and represents an entity
    2. A collection of API endpoints
    3. A list of possible states
  6. What is an enum?
    1. An object that contains fields and represents an entity
    2. A collection of API endpoints
    3. A list of possible states
  7. What is a service?
    1. An object that contains fields and represents an entity
    2. A collection of API endpoints
    3. A list of possible states