Re: [grpc-io] Using a single CompletionQueue for server and client objects

2016-10-18 Thread Adam Paszke
That’s great! Thanks for a super quick response!

Best,
Adam

> Wiadomość napisana przez Michael Lumish  w dniu 
> 18.10.2016, o godz. 22:03:
> 
> 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  > 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
>  
> .
> 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/57F08B8D-CC64-499D-81CD-15F177875ED0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [grpc-io] Using a single CompletionQueue for server and client objects

2016-10-18 Thread 'Michael Lumish' via grpc.io
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  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
> 
> .
> 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.