Enhance current get_result
implementation
#923
Replies: 5 comments 2 replies
-
The idea here is to get rid of covalent/covalent_dispatcher/_service/app.py Line 101 in ffadb62 What we want is a Python message queue on the server. When there are workflow updates, events are added to the queue. So instead of The responses sent by We should also think about covalent/covalent/_results_manager/results_manager.py Lines 155 to 159 in ffadb62 Should This whole block should be rewritten. covalent/covalent/_results_manager/results_manager.py Lines 72 to 78 in ffadb62 We want to make sure that covalent/covalent_dispatcher/_service/app.py Line 131 in ffadb62 |
Beta Was this translation helpful? Give feedback.
-
Note that if the |
Beta Was this translation helpful? Give feedback.
-
One problem with simply using a multiprocessing/multithreaded queue is that it would still block the web server from processing any additional requests until Update: we actually no longer use eventlet (which doesn't work with Python 3.10) but instead use the built-in Flask dev server (Werkzeug). Its concurrency model remains to be investigated... |
Beta Was this translation helpful? Give feedback.
-
This work is being implemented in #35 |
Beta Was this translation helpful? Give feedback.
-
@scottwn @wjcunningham7 @santoshkumarradha documenting few points from the team discussion we all had regarding the API changes with regards to
|
Beta Was this translation helpful? Give feedback.
-
Current the
get_result
implementation keeps pinging the dispatcher's get_result endpoint incessantly until the result is ready to be retrieved. This causes a lot of CPU overhead and bottlenecks the system. The introduction of thetimeout
parameter may cause issues for long running workflows, since the request can simply timeout out before the workflow finishes resulting inHTTPTimeoutErrors
A more efficient solution might be to check if the result is in the database based on signals (multiprocessing queues, asyncio.subprocesses etc). Going forward a planning issue could be created in order to improve the current get_result implementation.
@FyzHsn @scottwn @wjcunningham7 @cjao
Beta Was this translation helpful? Give feedback.
All reactions