I was setting up gRPC for an electron app which is supposed to communicate with a python application. After a bit of struggling to get the basic communication up and working I've ran into some limitations.
For a python gRPC server all the example create an iterator for streaming responses - is there any other way to use that? I'm using threads / workers to actually handle the request and provide the individual data responses, which is not possible using an iterator.
Is there some API to handle cancellations by the client? E.g., the client starts a request, python server starts streaming; client cancels the transfer (in nodejs, simply by invoking call.cancel()). For my application as a server I'd like to know if a client cancelled the request (explicitly). I've found the interceptor in the examples but it is marked as experimental and it is pretty heavy stuff...
I don't think I can answer this question, and it's unlikely to be seen by anyone who can. You might try asking on StackOverflow, or our official forum: https://groups.google.com/forum/#!forum/grpc-io
I was setting up gRPC for an electron app which is supposed to communicate with a python application. After a bit of struggling to get the basic communication up and working I've ran into some limitations.
For a python gRPC server all the example create an iterator for streaming responses - is there any other way to use that? I'm using threads / workers to actually handle the request and provide the individual data responses, which is not possible using an iterator.
Is there some API to handle cancellations by the client? E.g., the client starts a request, python server starts streaming; client cancels the transfer (in
nodejs
, simply by invokingcall.cancel()
). For my application as a server I'd like to know if a client cancelled the request (explicitly). I've found theinterceptor
in the examples but it is marked as experimental and it is pretty heavy stuff...Any help appreciated :)