safe-global / safe-decoder-service

Decodes transaction data providing a human readable output
MIT License
2 stars 0 forks source link

[Research] How to do async tasks #7

Open Uxio0 opened 6 days ago

Uxio0 commented 6 days ago

Define what to use for async tasks:

Most tasks will be triggered when reading messages from our RabbitMQ event queue

falvaradorodriguez commented 2 days ago

As an initial result of this work, I would like to share some of the conclusions:

FastAPI background tasks would not be a good idea for the kind of processing we need. Even in its own documentation it recommends to use some tool like Celery (https://fastapi.tiangolo.com/tutorial/background-tasks/#caveat)

Between Celery and Dramatiq, I haven't found a strong characteristic that makes me choose one or the other. As main differences I see the following:

Now, as a personal opinion and for discussion with the team: Since we know the "problems" we are having with Celery in other projects, and in view of the proof of concept, maybe we can give a chance to Dramatiq for this project. In this way we can assess whether we avoid some of the known problems and the tool is as light in terms of resource consumption as it claims.

What do you think @safe-global/core-api?