Keynote: The Natural State of Computers
summary
Argues that Python web apps move from blocking WSGI to native async, claiming Django 3.0 native async will let apps handle long-lived connections and nonblocking I/O; names ASGI servers (uvicorn, Daphne) and libraries like twisted and asyncio and trio; shows benchmarks where async is slower at zero network latency but far better once per-request latency rises, and cites real hardware numbers (Ryzen 3600 six cores $200, EPYC 7702 64 cores $7,500, Melbourne→LA ~315 ms) and working ASGI/WebSocket stacks already in use.
AI-written summary · about
chapters (38)
- 0:00Intro
- 0:15the natural state of computers
- 1:362015 django channels 1.0 sync django, async shell
- 2:08The Future of Django (alternate)
- 3:22Django might be able to support async & sync views
- 3:36Adopting an asynchronous framework is a long-term way forward
- 4:21start from the start
- 5:12gil stymies multithreading
- 6:03the gil is a rough lock
- 7:39async isn't new twisted, tornado, gevent
- 9:23real coroutines: async def and await
- 11:45languages need an async story
- 14:09spectre mitigations -15% performance hit
- 16:19physics is the unmovable force
- 21:13disparate clocks
- 26:39less single core performance increased latency increased complexity
- 29:05be aware of simultaneous multithreading
- 30:02maintain cache coherency
- 31:13preemptive multitasking the mind killer
- 33:42checking the microwave because it beeps
- 34:03native async: work within the system
- 35:02second: asynchronous webapp
- 35:30def async and await syntactic sugar for callbacks
- 35:57async code returns Promise/Deferred
- 36:18suspends the coroutine resumes on callback
- 38:11threadpool exhaustion
- 39:26hard concurrency limit number of possible threads
- 39:38async hard concurrency limit your single core performance
- 40:04python GIL means no python multithreading
- 40:21multiple processes accepting incoming connections on the same socket
- 40:54single process doing accepts, delegating to subprocesses
- 41:51subprocess worker pool distributed worker cluster
- 44:05server side rendering is dead
- 45:29not big data lots of small data
- 46:15message-passing is great
- 48:23python, python, python
- 49:39in-process DNS server
- 50:20sky's the limit
related talks
31mHey, Python-Web-Community! What's going on?
01h 01mKeynote 2: The State of Python in 2024
26mSync or async? Feel the magic of coroutines and the event loop in Django
18mFrom WSGI to ASGI - Django 3.0
32mSync vs. Async in Python: Tools, Benchmarks, and ASGI/WSGI Explained
01h 00mKeynote: Python now and in the future
31mInside ASGI The Engine Behind Modern Python Web Frameworks
40mTaking Django Async
