grpc.github.io icon indicating copy to clipboard operation
grpc.github.io copied to clipboard

Python Asynchronous / Streaming RPC

Open lmapii opened this issue 7 years ago • 1 comments

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...

Any help appreciated :)

lmapii avatar Sep 02 '18 17:09 lmapii

Hi,

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

carl-mastrangelo avatar Sep 05 '18 17:09 carl-mastrangelo