Yes, you can do that. In fact, the Node.js library automatically uses a single completion queue for all operations and it is able to handle any number of simultaneous clients and servers (in principle).
On Tue, Oct 18, 2016 at 12:59 PM <adam.pas...@gmail.com> wrote: > Hi, > > I'm implementing a distributed system and it seems that gRPC would be a > great fit for my project. However I have quite simple problem: can a single > CompletionQueue be used both for listening for incoming RPC calls to a > local server, and for responses to RPC calls initiated from the process? It > would seem to make sense, but I want to make sure it's supported. I would > like to avoid having separate queues, and doing active polling on them. My > system is completely decentralised, and I need to have each node both send > and respond to requests from other nodes simultaneously. > > My communication protocol is divided into three phases: > 1. Node A picks another one (B) in a partially random fashion and sends a > small request to it > 2. Node B responds with requested data and also requests some additional > information from A > 3. Node A responds with the information > > However, since there's no hierarchy, both A and B should be able to start > this cycle. > > Thanks, > Adam Paszke > > -- > 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/43bab32b-9c38-47d9-9e06-a8921a362bb4%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/43bab32b-9c38-47d9-9e06-a8921a362bb4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAPK2-4dCE3yc2aD711PcpvuoZP0MB8Yf8Bs7MPKrdVRXWnE_tQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.