Building real time applications with Django
summary
Explains how Channels 2.0 + ASGI let Django handle real‑time protocols (WebSockets) with Daphne as the protocol server, a channel layer for IPC, routers, and stateful consumers that live per‑connection. Builds a mini Google‑Docs style demo: live user counts, per‑document read/edit labels and browser notifications — demoed via video and working. Notes practical details: use Python 3, convert sync/async with sync_to_async, and a pitfall where sending an event with a missing handler silently fails.
AI-written summary · about
chapters (11)
- 0:00Introduction to Channels
- 1:18From synchronous to async
- 3:04Core concepts and ASGI
- 5:25Channels architecture
- 8:24Consumers and WebSockets
- 11:14Real-time demo walkthrough
- 13:38Configuring routing and layers
- 16:48Building consumer logic
- 19:40Advanced consumer management
- 24:45Integrating with Django models
- 27:30Q&A and final thoughts
related talks
22mDjango Channels Teaching a mature framework new tricks
45mWebSockets: Intro to Messaging
12mHacking Django Channels for Fun (and Profit)
42mA Python-Driven Web App Framework with Django, Channels, and React
40mTaking Django Async
26mUsing Django 4.2's StreamingHttpResponse and HTMX SSE to provide real time notifications
29mBuilding and scaling a live event platform with django-channels
41mWebRTC with Django, Channels, HTMX, and coturn with Ken Whitesell
