Keynote: Async, Python, and the Future
summary
Async in Python centers on asyncio (2014) and an event loop that await pauses coroutines cooperatively, so a single blocking synchronous call can freeze the whole process; threading hits costly context switches around ~100 threads and multiprocessing inflates memory. Frameworks like Twisted and gevent exist but require care (gevent’s monkey‑patching causes rare hard bugs). Django 3.1 supports both ASGI and WSGI paths but the ORM still needs async-safe APIs because you cannot tell if a function returns a coroutine until you call it. Use async for IO‑bound parallel queries, sockets, and notifications.
AI-written summary · about
chapters (39)
- 0:00Introduction
- 0:40Who am I
- 1:35Overview
- 2:24Python is not alone
- 3:24Async history
- 5:06Threading and multiprocessing
- 7:18Twisted
- 9:18GEvent
- 10:29Generators
- 11:43Timeline
- 12:16What did we learn
- 12:53The present
- 13:49Asynchro
- 14:27await
- 15:15eventloop
- 16:02cooperative time slicing
- 16:42bad things happen
- 17:11cooperative problems
- 18:57async def
- 21:37synchronous vs asynchronous
- 23:03Django request flows
- 24:36The future
- 25:08What does the future hold
- 26:22More library support
- 27:14Safety
- 28:02Silent Failure
- 30:10Workload
- 31:02Horizontal scalability
- 31:39Web is changing
- 33:30Everything should be async
- 34:28Premature optimization
- 35:44The real thing
- 36:17Web developers
- 36:30Parallel queries
- 39:18What this means for you
- 40:14Django
- 40:51What are you building
- 41:55Get a feel
- 42:40Open source
