Understanding gRPC
As per grpc.io, gRPC is a high-performance, open source universal RPC framework. Originally developed by Google, gRPC uses HTTP/2 for transport and a Protocol Buffer (protobuf) as the interface description language. gRPC is a contract-based binary communication system, and it is available across multiple ecosystems. The following diagram from gRPC's official documentation (https://grpc.io) illustrates client-server interaction using gRPC:
Figure 10.9 – gRPC client-server interaction
As with many distributed systems, gRPC is based on the idea of defining a service and specifying an interface with methods that can be invoked remotely, along with contracts. In gRPC, the server implements the interface and runs the gRPC server to handle client calls. The client side has the stub, which provides the same interface as defined by the server. The client calls the stub in the same way as it invokes methods in any other local object to...