Answer the question
In order to leave comments, you need to log in
How to communicate between processes?
Hello!
There is such a task:
1. The client starts data processing
2. Tornado receives a request from the client and starts a heavy and long process.
How to start this process correctly?
Now everything is implemented in this way:
1. A heavy process is called through threads, a certain identifier is passed there as a parameter
2. Next, periodic requests are made via js to another url with an identifier
passed 3. tornado makes a request to the database to track progress (respectively, that long process, writes something to the database using the identifier passed earlier)
Unfortunately, redis and the like cannot be used.
Is this architecture correct? Maybe there are other more canonical solutions?
Answer the question
In order to leave comments, you need to log in
The best solution would be to use Message Queue.
Write down the task in one queue, listen to the second for an answer.
The process reads from the first queue and writes to the second.
You can look towards https://www.rabbitmq.com/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question