The fork support added in 1.15.0 in gRPC-Python is only for the client 
side. This means, on a gRPC-Python client, it is now possible to fork the 
process while an RPC is in progress. Typically mulitprocessing module is 
used to distribute your work to child processes and get the result back. 
For example, you could be getting streamed responses from a server and 
handle the response in a child process without affecting the ongoing 
streaming RPC in the parent process. This was previously not supported. In 
this example <https://github.com/grpc/grpc/issues/13873>, a datastore 
client forks using multiprocessing after it has created a gRPC connection 
and done an RPC. This didn't work prior to 1.15.0.

On Wednesday, September 26, 2018 at 9:48:05 PM UTC-7, Nanda wrote:
>
> With the recent launch of grpc-python 1.15.0 version fork method has been 
> enabled with GRPC_ENABLE_FORK_SUPPORT=1 flag, to achieve parallelism. Is 
> there any tutorial/example explaining how to make use of it ? (We have been 
> using single thread approach until now, as performance was degrading with 
> multiple threads (owing to GIL). So desparately need the multi-process way 
> of achieving parallelism in grpc-python.) Wondering how the request routing 
> actually happens. From Master to the forked processes ?
>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
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/9cfb875a-7117-43d4-a229-c22410688af5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to