~/talk

Taking Django Async

Talkat PyCon 2018 · on Friday, 2018-05-11· [django, python]

Channels 2.0 makes Django async-native by adopting asyncio, ASGI and a redesigned channel layer, with a ~75% rewrite that runs in production. Key tools are sync_to_async (thread‑pool execution) and async_to_sync (marshalling back to the main event loop). Redis remains an optional channel layer. Beware thread defaults—large CPU counts spawn many DB connections—but the new ASGI model and bridging functions prove the approach workable.

AI-written summary · about

  1. 0:00Intro
  2. 1:46Adds async protocol support to Django Headline protocol is WebSockets Also allows background jobs
  3. 2:51Python 2.7 compatible Twisted for webserver Synchronous Django code
  4. 6:59Asyncio-native Python 3.5 and up Supports async coroutines and sync threads
  5. 8:4175% rewrite
  6. 9:06Async interfaces are separate to sync
  7. 13:02Async-native most of the way
  8. 14:26Synchronous code has to run in threads
  9. 15:43Calling the ORM Rendering templates Handing off to Django views
  10. 17:01Async code runs on the event loop
  11. 19:58Both async and sync code are useful
  12. 26:59Turtles all the way down
  13. 28:48How much can we make async?
  14. 30:18What does an async ORM look like?
  15. 33:39Do we need to replace WSGI?
  16. 35:44Multiple servers (daphne, uvicorn) Multiple frameworks (Django. -?)
  17. 38:35What is Django?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.