Question about fallover setup in grpc

34 views
Skip to first unread message

Carfield Yim

unread,
Aug 1, 2017, 5:22:09 AM8/1/17
to grpc.io
Hi all

I've a server process develop using grpc, I would like to have a cool DR which receive request but don't stream response until that config option set to true

The implementation option I know is that in the service class, I handle that option and then don't run the StreamObserver.onNext(msg) until that config option set to true. However, if I doing that, I need to have that block of code for all my service classes. 

If there any better implementation approach?

Thanks.

Carl Mastrangelo

unread,
Aug 3, 2017, 7:01:52 PM8/3/17
to grpc.io
Can you show us a code snippet?  I cannot understand what problem you are describing.

Eric Anderson

unread,
Aug 10, 2017, 3:16:59 PM8/10/17
to Carfield Yim, grpc.io
I think you can do this with a server interceptor. Simply delay calling next until the configuration is available.

--
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/b6be3cdb-8618-415b-8939-7ce2c90b4560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Carfield Yim

unread,
Aug 14, 2017, 3:38:31 AM8/14/17
to grpc.io, carf...@gmail.com
Thanks a lot, thinks that what I need, so sorry I haven't get time to prepare the code snippet.


On Friday, August 11, 2017 at 3:16:59 AM UTC+8, Eric Anderson wrote:
I think you can do this with a server interceptor. Simply delay calling next until the configuration is available.
On Tue, Aug 1, 2017 at 2:22 AM, Carfield Yim <carf...@gmail.com> wrote:
Hi all

I've a server process develop using grpc, I would like to have a cool DR which receive request but don't stream response until that config option set to true

The implementation option I know is that in the service class, I handle that option and then don't run the StreamObserver.onNext(msg) until that config option set to true. However, if I doing that, I need to have that block of code for all my service classes. 

If there any better implementation approach?

Thanks.

--
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.
Reply all
Reply to author
Forward
0 new messages