Creating a protobuf service
Now that we have understood the definition of a protobuf message, we can move on to defining protobuf services. These services are comprised of RPC methods, each of which has a request and response message. To facilitate the implementation of these services, gRPC tooling will generate the necessary C# code, which can then be used as the base class for the service.
gRPC supports four types of RPC methods:
- Unary RPC: The client sends a single request message to the server and receives a single response message in return. This type of method is suitable for applications that need single request-response exchanges.
- Server streaming RPC: The client sends a single request message to the server and the server then responds with a stream of response messages. This type of method allows for continuous data exchange between the client and server.
- Client streaming RPC: The client sends a stream request message to the server and the server then responds...