Re: [grpc-io] Re: Grpc Java Server Side Streaming server stream cancellation detection

2019-05-06 Thread Isuru Samaraweera
Ok, thanks for the clarification. On Mon, May 6, 2019 at 8:48 PM Eric Anderson wrote: > Yes. Java does I/O on a separate thread, and that thread notices the > broken TCP connection. > > On Mon, May 6, 2019 at 8:13 AM Isuru Samaraweera wrote: > >> So it seems breaking of TCP connection is detec

Re: [grpc-io] Re: Grpc Java Server Side Streaming server stream cancellation detection

2019-05-06 Thread 'Eric Anderson' via grpc.io
Yes. Java does I/O on a separate thread, and that thread notices the broken TCP connection. On Mon, May 6, 2019 at 8:13 AM Isuru Samaraweera wrote: > So it seems breaking of TCP connection is detected by a separate thread > than the main thread right? > > > On Mon, May 6, 2019 at 8:39 PM Eric A

Re: [grpc-io] Re: Grpc Java Server Side Streaming server stream cancellation detection

2019-05-06 Thread Isuru Samaraweera
So it seems breaking of TCP connection is detected by a separate thread than the main thread right? On Mon, May 6, 2019 at 8:39 PM Eric Anderson wrote: > When the TCP connection is detected to be broken, all RPCs on that > connection are cancelled. This calls context.cancel() >

Re: [grpc-io] Re: Grpc Java Server Side Streaming server stream cancellation detection

2019-05-06 Thread 'Eric Anderson' via grpc.io
When the TCP connection is detected to be broken, all RPCs on that connection are cancelled. This calls context.cancel() . That immediately does two things: changes the boolean that isCance

Re: [grpc-io] Re: Grpc Java Server Side Streaming server stream cancellation detection

2019-05-04 Thread Isuru Samaraweera
Hi Carl, So when you enable keep alive with 5 mins and 10 second keepalivetimeout connection will be checked for activeness and if time out elapsed it will be closed. Thats clear..So whats happening when you say Context.current().isCancelled()??Does it do ping internally ?How it is done? Because w

[grpc-io] Re: Grpc Java Server Side Streaming server stream cancellation detection

2019-05-02 Thread 'Carl Mastrangelo' via grpc.io
You can turn on keep alives on the channel / server builder, but that's about the best you can do. The problem is that a broken connection just means silence. You can't tell the difference between the packets taking a long time, and the the packets not arriving. Keep-alives let you check the