Can I define a gRPC non-blocking client call where no status is sent back from the sever to client?

Viewed 469

What are best practices to implement high frequency client calls where it is not necessary to send status back from the server to the client?

A good analogy would be UDP vs. TCP.

I am aware of the option to define an empty message response:

service MyService {
  rpc FastComm (google.protobuf.Empty) returns (google.protobuf.Empty) 
}

I am not sure if a status response is still sent from the server to the client and if the client thread is blocked waiting for status.

The idea would be to eliminate as much overhead as possible and allow the client thread to continue after sending the request without having to use an asynchronous client call.

1 Answers

If you don't use asynchronous client call, even define an empty response, there still wait response from server.

There has no good idea, either use async call or use client stream to do it. You also can use thread pool to handle request as more as you can.

Related