Summary
In this chapter, we saw the key features that we get out of the box when using gRPC. We saw that we return errors with error codes and messages. There are way fewer error codes in gRPC than in HTTP, which makes them less ambiguous.
After that, we saw that we can use the context to make a call cancelable and specify deadlines. These features are important for making reliable calls and making sure that if something goes wrong on the server side before returning, our client is not waiting indefinitely.
With context and interceptors, we also saw that we can send metadata and use them to validate requests. In our case, we checked for an authentication token every time a request was made. On the client side, we saw that interceptors can automatically add the metadata for us. This is especially useful for metadata that is shared across services and/or endpoints.
Then, we saw how we can encrypt communication over the network. We used TLS, as this is the most common way to...