Just Add Await: Retrofitting Async Into Django
summary
Moves from claim to implementation: adds ASGI support landed to Django, builds heavy glue like sync_to_async shims and a thread-local / executor layer to run legacy code, and measures progress with a branch that 90% tests pass. Explains tools (event loop, Daphne, threadpool executors), surprising pitfalls (SQLite thread sensitivity, context-switch costs at thousands of threads), and shows a partly working retrofit that still needs ORM and middleware hardening.
AI-written summary · about
chapters (32)
- 0:00Intro
- 0:40Overview
- 3:20Async
- 5:55Event Loops
- 8:26Threads
- 12:08Async vs synchronous code
- 14:38Dangers of asynchronous code
- 15:38Synchronous code
- 16:37Framework problems
- 18:10Async vs synchronous
- 21:35Thread Sensitivity
- 22:36Simplicity
- 24:00Django
- 25:20Outside in approach
- 25:59Phases
- 27:26Async Views
- 29:30WSGI
- 30:17Django and NIH
- 31:25Django and Whisky
- 33:31Whisky Handler
- 34:42GetResponse
- 36:03SGI Handler
- 37:02SGI Server
- 37:41SGI Compatibility
- 38:29File Uploads
- 40:16SGIRef
- 42:56SGIServer
- 43:34Views
- 47:38Middleware
- 51:03Sink Diffuse
- 52:09The RM
- 55:35The future
related talks
45mJust Add Await: Retrofitting Async Into Django
32mAsynchronous Django: Unlocking the Power of Async Programming
27mTaking Django Async
21mIs Django async yet?
25mTaking Django's ORM Async
40mTaking Django Async
26mSync or async? Feel the magic of coroutines and the event loop in Django
31mReinventing Django for the Real-Time Web
