Summary
In this chapter, we saw how the gRPC communication mechanism is most suitable to be used for direct communication between microservices, as it uses a highly efficient Protobuf messaging protocol over HTTP/2. As well as making synchronous request-response calls, gRPC is capable of asynchronously streaming data both ways between the client and the server.
gRPC cannot work in browsers as it requires HTTP/2, which browsers don't fully support. However, a gRPC-Web implementation has been created specifically to enable gRPC in the browser. However, gRPC-Web still has severe limitations, as it requires many setup steps, is much less efficient than standard gRPC, and doesn't support client-streaming calls.
A good alternative to gRPC-Web for browsers is SignalR, which is already embedded in ASP.NET Core. It supports bi-directional messaging (both singular and streaming) and takes minimal effort to set up.
After reading this chapter, you should know how to apply gRPC...