Re: [grpc-io] Re: Detecting client disconnections in the server side

2017-08-31 Thread ismailkhan93
Is listening on the context.Done() channel in Go (on the server) sufficient? I ran a client and server locally with a client listening on a server->client stream, killed the client process, and saw that context.Done() was indeed called on the server. I'm assuming that killing a client process

Re: [grpc-io] Re: Detecting client disconnections in the server side

2017-08-30 Thread Arpit Baldeva
>>Like I suggested before, why not send a "Going away" message just before disconnect? I am not sure when/what context you made that suggestion. Anyhow, "Going away" message is good for graceful close. For ungraceful exits, a heartbeat rpc is the way to go in gRPC. That rpc can be implemented in

Re: [grpc-io] Re: Detecting client disconnections in the server side

2017-08-30 Thread 'Carl Mastrangelo' via grpc.io
The short answer is that you can't tell when a connection has gone away. Even gRPC can't really be sure when a connection is gone (we can guess). Like I suggested before, why not send a "Going away" message just before disconnect? This is the same solution that HTTP/2 uses under the hood (called

Re: [grpc-io] Re: Detecting client disconnections in the server side

2017-08-30 Thread Arpit Baldeva
I think most people asking this question are interested in knowing whether a particular client/user is dead. The keepalive stuff is useful for grpc to internally manage the network resources clean up. However, as the network layer is hidden, anybody who wants to detect the state of a particular

[grpc-io] Re: Detecting client disconnections in the server side

2017-08-30 Thread 'Mahak Mukhi' via grpc.io
https://github.com/grpc/grpc-go/blob/master/keepalive/keepalive.go On Wed, Aug 30, 2017 at 1:46 AM, wrote: > Was this ever implemented? Specifically, a way for grpc-go to detect if a > client is disconnected from a server->client stream? Can't find it on the > grpc-go

[grpc-io] Re: Detecting client disconnections in the server side

2017-08-30 Thread ismailkhan93
Was this ever implemented? Specifically, a way for grpc-go to detect if a client is disconnected from a server->client stream? Can't find it on the grpc-go repo... On Wednesday, March 8, 2017 at 5:03:42 AM UTC+5, mmu...@google.com wrote: > > We are working on providing a solution for such a

[grpc-io] Re: Detecting client disconnections in the server side

2017-03-07 Thread mmukhi via grpc.io
ps The last message was pertaining to golang. On Tuesday, March 7, 2017 at 4:03:42 PM UTC-8, mmu...@google.com wrote: > > We are working on providing a solution for such a case: If the other side > of the connection becomes unresponsive due to some reason the connection is > closed and the any

[grpc-io] Re: Detecting client disconnections in the server side

2017-03-07 Thread mmukhi via grpc.io
We are working on providing a solution for such a case: If the other side of the connection becomes unresponsive due to some reason the connection is closed and the any stream(RPC) reading on it will get an error that the connection was closed. For the chat application, I'm assuming a streaming

Re: [grpc-io] Re: Detecting client disconnections in the server side

2017-03-03 Thread Constantine
Thank you for *.end()* on the server, I forgot it. I just want to say that it is working in the *nodejs* server. But guys here talking about heart-beat and other stuff, I was just curious how to implement it within gRPC if it is not supported yet :) Sorry if it was annoying. On Saturday,

Re: [grpc-io] Re: Detecting client disconnections in the server side

2017-03-03 Thread 'Michael Lumish' via grpc.io
I don't understand what the problem is. You say that you get the 'end' event on the server side when the client disconnects. What else do you need? Also, with streaming calls, you need to call call.end() on the server side too. The callback for the 'end' event is usually a good place to do that.

[grpc-io] Re: Detecting client disconnections in the server side

2017-03-03 Thread Constantine
I have a *nodejs* server and a *nodejs* client. With a "streaming client <--> streaming server" when - I call the *.end()* method on the *client* object, the *.on('end')* event is called on the *server* - I disconnect the *client* code with *ctrl+c, *also the *.on('end')* event is

[grpc-io] Re: Detecting client disconnections in the server side

2017-03-03 Thread Constantine
On Saturday, February 25, 2017 at 3:49:59 AM UTC+3:30, gust...@gmail.com wrote: > > Hi all, > > How can I detect in the server side when a client gets disconnected? The > typical use case could be a chat server where you want to notify other > users when somebody leaves ungracefully. > > I

[grpc-io] Re: Detecting client disconnections in the server side

2017-03-03 Thread Arpit Baldeva
For Go, this thread claimed that something like this would be available in Q1 2017 - https://groups.google.com/forum/#!topic/grpc-io/C0rAhtCUhSs Regardless of the language (I am working with C++ impl), my plan to implement this functionality is also RPC based (streaming Ping rpc). On server

[grpc-io] Re: Detecting client disconnections in the server side

2017-03-02 Thread 'Carl Mastrangelo' via grpc.io
I'm actually more familiar with Java, though the architectures aren't that different. Most of gRPC is centered around the Call, rather than the Connection. If it were me, I would make a custom RPC that implies "Disconnecting". This would also allow you to embellish the disconnect (like add a

[grpc-io] Re: Detecting client disconnections in the server side

2017-03-02 Thread Gustavo GarcĂ­a
Hi Carl, Thank you for your answer. This is a chat application, so when a user disconnects you want to tell everybody else in the room that somebody left.That's why I need to detect it. Does it makes sense? If I turn on keep-alives, how would I detect the connection drop in a GRPC Go