Hello,
I am very interested in the gRPC bi-directional streaming feature. I have a
few questions on the server side. In the .proto file, I define a simple
streaming RPC and message below
service MfMessaging {
rpc MfRpc (stream MfStream) returns (stream MfStream) {}
}
message MfStream {
bytes message=1;
}
My first question is: what is the thread model at server side? I mean how
gRPC handles if there are multiple concurrent requests from different
clients? Does gRPC spawn a thread for each client? If yes, is there any
limit or gRPC has a thread pool underneath?
My second question is: In the service routine, I get a ServerReaderWriter
stream (e.g. ServerReaderWriter<MfStream, MfStream>* stream). What is
lifetime of this stream? Can I pass this stream to another thread which
writes response back later?
Look forward to your reply. Thank you very much!
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/1a419333-b0e7-431c-9b85-35a4dc11a3b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.