What this book covers
Chapter 1, Creating a Basic gRPC Application on ASP.NET Core, explains how to build a basic ASP.NET Core server application that uses gRPC. We will also build a basic console application that will act as a gRPC client.
Chapter 2, When gRPC Is the Best Tool and When It Isn't, outlines use cases where gRPC is the best tool for the job. It will also cover some scenarios where other tools would be more suitable than gRPC.
Chapter 3, Protobuf – the Communication Protocol of gRPC, takes you through the structure of Protobuf – the communication protocol that gRPC uses. You will be shown the basic structure of a proto file – a file that defines the interface that both the client and the server use to communicate with each other. All native data types available with Protobuf will be covered, along with other structural components of the protocol.
Chapter 4, Performance Best Practices of Using gRPC on .NET, explains how to apply gRPC inside the code in the most efficient way possible. You will learn a few ways to make your gRPC communication as fast as it can be.
Chapter 5, How to Apply Versioning to the gRPC API, emphasizes the importance of applying a good versioning strategy to your server-side gRPC endpoints, also known as application programming interfaces (APIs). You will also learn some techniques for making API versioning easy.
Chapter 6, Scaling a gRPC Application, explains how microservices are supposed to be designed in such a way that they can easily be scaled. An assumption of microservices architecture is that it should be possible to add new instances of any given microservices when needed, especially when they are stateless. As gRPC has been primarily designed to enable communication between microservices, it needs to be scalable too.
Chapter 7, Using All Different Call Types That gRPC Supports, covers the four different types of calls – unary, client-streaming, server-streaming, and bi-directional streaming – that gRPC supports.
Chapter 8, Using Well-Known Types to Make Protobuf More Handy, explains that since native Protobuf data types don't perfectly map to data types commonly used in programming languages, Google has created a library of so-called well-known types to make this process easier. This enables developers to send requests without payloads, use nullable fields, work with dates, and exchange loosely-typed payloads.
Chapter 9, Securing gRPC Endpoints in Your ASP.NET Core Application with SSL/TLS, explains that just like any standard HTTP endpoint, gRPC endpoints can be secured with SSL or TLS encryption and made accessible via the HTTPS protocol. This chapter will show you how to enable this encryption and protocol.
Chapter 10, Applying Authentication and Authorization to gRPC Endpoints, explains that, if needed, gRPC endpoints can be made accessible only to authenticated users or users with specific permissions. This chapter shows how to enable this functionality for gRPC endpoints on .NET.
Chapter 11, Using Logging, Metrics, and Debugging in gRPC on .NET, explains that it's important to be able to identify problems with an application while it is being developed. It's also important to monitor what the application is doing once it's been deployed. This chapter shows how to do all of these things. You will learn how to debug an application that's under development and how to use logging and metrics inside an application that has already been deployed.