In both scenarios you are covered. Do recognize that streams *will* eventually
die, so you should plan on reconnecting them. But they can last for a long
time. Depending on your network, you may also want to enable keepalive via
NettyChannelBuilder.keepAliveTime. You'll want to use the async stub API.
gRPC will still use a thread, but it can share the thread across all the
streams.

On Tue, May 16, 2017 at 3:28 AM, <[email protected]> wrote:

>
> Hi All,
>    This is Deepak here, i have been reading about gRPC from last couple of
> weeks, I want to use gRPC in one of my solution.
>
> But as a beginner in gRPC i have several doubts about it. My scenarios are
> (both needs to be supported together at same time in same application)
>
> 1) My application is a gRPC client, which invokes server-side streaming
> RPC. (there can be multiple RPC calls and all rpcs need to be kept alive
> for relatively long time)
>     rpc subscribe(argument) returns (stream message) {};
>
> 2) My Application is a gRPC server which provides a bi-directional
> streaming RPC and will be used by other application to push notifications
> to my applications
>    rpc notify(stream message) returns(stream message)
>
>
>
> My doubts are
> For Scenario 1:
> a) Can I have a non blocking implementation in java where my threads are
> not waiting for the server stream and the RPCs are kept alive untill i
> cancel it.
> b) Can both the scenarios exist in the same application at a same time??
>
> Thanks ,
> Deepak
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/631a750b-4397-4842-a3e7-8bf9f8b2f959%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/631a750b-4397-4842-a3e7-8bf9f8b2f959%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 [email protected].
To post to this group, send email to [email protected].
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/CA%2B4M1oPQPrYPLq7Ks%2BOyPo5fmmodQrqQSP0N_%2BES1Zd1iMsvLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to