Blocking on multiple grpc completion queues

334 views
Skip to first unread message

akshitha...@gmail.com

unread,
Aug 31, 2017, 3:31:53 PM8/31/17
to grpc.io
Is it possible for one server thread to block (Next()) on multiple completion queues? I am thinking along the lines of an API that invokes an underlying select() that can monitor multiple RPC channels, waiting to see which of the underlying channels become ready.

Sree Kuchibhotla

unread,
Aug 31, 2017, 4:13:57 PM8/31/17
to akshitha...@gmail.com, grpc.io
Currently, it is not possible to do this. May consider exposing a select'able interface at some point (but no plans in the near-future)

thanks,
-Sree

On Thu, Aug 31, 2017 at 12:31 PM, <akshitha...@gmail.com> wrote:
Is it possible for one server thread to block (Next()) on multiple completion queues? I am thinking along the lines of an API that invokes an underlying select() that can monitor multiple RPC channels, waiting to see which of the underlying channels become ready.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@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/491a9fa0-bb22-4a88-be8f-fcb264d8e453%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

akshitha...@gmail.com

unread,
Aug 31, 2017, 7:03:11 PM8/31/17
to grpc.io
@Sree Thank you for your response!
I would like to develop a custom grpc API for this purpose. Could you give me some tips on the code sections or files that I can begin with?

Thanks!

Regards,
Akshitha

On Thursday, August 31, 2017 at 4:13:57 PM UTC-4, Sree Kuchibhotla wrote:
Currently, it is not possible to do this. May consider exposing a select'able interface at some point (but no plans in the near-future)

thanks,
-Sree
On Thu, Aug 31, 2017 at 12:31 PM, <akshitha...@gmail.com> wrote:
Is it possible for one server thread to block (Next()) on multiple completion queues? I am thinking along the lines of an API that invokes an underlying select() that can monitor multiple RPC channels, waiting to see which of the underlying channels become ready.

--
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+u...@googlegroups.com.

Sree Kuchibhotla

unread,
Aug 31, 2017, 7:40:50 PM8/31/17
to akshitha...@gmail.com, grpc.io
Hi Akshita,
Just taking a step back, If you need some way to monitor multiple channels, one pattern that you can use is to just create one completion queue but use it for all "calls" (across all channels). This way, you just have one completion queue and its easier to handle with one thread
(i am assuming you are using async api)

It the above does not work for you and you have another proposal in mind, I encourage you to create a gRPC RFC (process here) outlining the API you are proposing - as a first step. This would be very helpful to get comments / ideas from others in grpc community.

thanks,
Sree


To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.

akshitha...@gmail.com

unread,
Sep 5, 2017, 9:38:22 AM9/5/17
to grpc.io, akshitha...@gmail.com
This was enormously helpful. 
Thank you so much for your response!

Regards,
Akshitha
Reply all
Reply to author
Forward
0 new messages