Skip to main content

All Questions

0 votes
2 answers
130 views

share variable that change after import between main process and child processes

I've a project in gRPC where the main.py spawns grpc servers as subprocesses. Also in the project I've settings.py that contains some configurations, like: some_config = {"foo": "bar&...
nscode's user avatar
  • 157
2 votes
1 answer
1k views

How to make each client get their state if there is class instance in grpc-python server side?

I want to use grpc-python in the following scenario, but I don' t know how to realize it. The scenario is that, in the python server, it uses class to calculate and update the instance' s state, then ...
Yanglan Wang's user avatar
3 votes
1 answer
2k views

Can I improve performance when using Python gRPC client stubs in more threads?

Lets say I have a Python gRPC server and a corresponding client. According to this Question the same gRPC channel can be utilized to be passed to client stubs, each running in different threads. Lets ...
MichaelW's user avatar
  • 1,476
2 votes
1 answer
2k views

grpc server immediately quits if running together with treaded Flask app

I'm trying to run Flask REST API and gRPC API inside a single application and container, and for some reason gRPC server closes immediately after start. So I have a simple Flask app that is serving ...
alexykot's user avatar
  • 729
1 vote
1 answer
7k views

grpc-Python max_workers limiting number of simultaneous processes

while using python grpc server, server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) this is general way in which grpc server is instantiated. But with this running, if I try to run more ...
Tushar Seth's user avatar
0 votes
1 answer
1k views

How can I ensure each gRPC stream gets updated once and avoids race conditions?

What I'm trying to do: When I make an update to the state of an object, all gRPC clients should be given the update via a gRPC stream. It's important that each client gets every update, and that they ...
Kevin S's user avatar
  • 960
0 votes
0 answers
106 views

How to respond to client through thread - PYTHON

I'm trying (failing) to use gRPC (grpc.io) with threads. What I want that after receiving a request, scale it to a thread and respond through that thread, without the 'return' part of the gRPC. ...
Cecília Assis's user avatar