Web
Studies
Setup
Worker
Gunicorn + Uvicorn.
HTTP client
Sync
Requests.
Async
AIOHTTP.
Next step
Strategy about blocking code
- All blocking code will be split in db and others.
- Make a
v2
to all endpoints with blocking code from the category others. - All new endpoints that use blocking code must use async functions.
- All blocking code from the category db is sync, I think that forcing a massive migration should be a bit useless, django just wrote a wrapper.
Study async replacements to the actual libs
Sometimes the async libs work significantly faster than sync libraries, it is necessary to collect those cases and use those libs, you must take into consideration that some codes are faster using sync code.
See how progress Uvicorn
Uvicorn is the most stable worker, if it fails we must study how do works Hypercorn with Evloop.