With a completion queue and using the async API, you could be multiplexing thousands of bidi streams on a single thread, and some applications really need that - most however don't. If you're not in that category, I'd encourage you to stick with the synchronous API's and keep your code simple: the async API is substantially harder to work with.
On Friday, September 9, 2016 at 1:08:20 AM UTC-7, Michael Leonard wrote: > > > Hi > > I'm new to grpc (love it so far!) and have a helloworld bidirectional > streaming example working in C++. I made this by going through the > helloworld and route_guide examples and combining the two so I can stream > HelloRequest and HelloResponse messages back and forth between the C++ > client and C++ server in any order I choose. > > *My question is:* is there such a thing as 'async bidirectional > streaming'? > > My understanding of async in the single non-streaming case is that it > allows the program to do something else and not block while waiting for the > response to the rpc. In the bidirectional streaming case I believe I can > send something from the client to the server, do something else, send > something else, etc... and so achieve the same non-blocking feature. > > *Do I gain anything by implementing the completion queue in bidirectional > streaming case, or is it only useful for the non-streaming variants??* > i.e. have I got already got the most general/flexible option already > working, or would using a completion queue in my bidirectional streaming > code give me any extra features/advantages/possibilities? > > > Thanks very much in advance! > > Mike > -- 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 post to this group, send email to grpc-io@googlegroups.com. 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/0b75feef-c47e-489e-a49a-9d9c46a482e6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.