I don't think there is a right way for this. If the client doesn't need to 
know the result of long-running job, gRPC part would be simple. A server 
just needs to manage its work; it could be just spawning a dedicated thread 
handling that job.
If the client needs the result, it's just a normal rpc handling. Client can 
do sync/async approach here so it's up to you.

On Thursday, March 3, 2022 at 3:10:50 PM UTC-8 Anh Tran wrote:

> Hi,
>
> I have a client calling a RPC on the server. The server will then trigger 
> a long running process (could be minutes, could be hours). 
>
> Should I put the RPC call in the client into a thread, or should I put the 
> long running task on the server into a thread, assuming that the client 
> doesn't care about the result (we have handling for that already).
>
> I just want to know the proper/de-facto way to do this when using gRPC.
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/1143f269-4f91-4f92-a2c1-df7cad5b72a4n%40googlegroups.com.

Reply via email to