Workshop 1 - Let's Make a Realtime Game with Django Channels
summary
Live code of a simple online game using Django Channels and WebSockets (WS/WSS) shows an ASGI stack with Daphne, Redis as the channel layer, and Celery for periodic heartbeats. The demo builds a rock‑paper‑scissors game with players randomly assigned red or blue teams, 10‑second rounds driven by a Celery tick, game state kept in Redis in‑memory stores, player IDs and names, and front‑end WS handlers. Chat, timer, and periodic facts work; the game logic is basic but functional and code lives on the GitHub repo (2022→2023 rename).
AI-written summary · about
chapters (9)
- 0:00Workshop intro
- 1:28Django Channels & WebSockets
- 8:03Event-driven architecture
- 13:25Chat server setup
- 25:29Sync vs async
- 30:18Adding user auth
- 31:50Celery periodic tasks
- 37:38Real-time game build
- 52:53Q&A
related talks
22mDjango Channels Teaching a mature framework new tricks
45mWebSockets: Intro to Messaging
31mReinventing Django for the Real-Time Web
12mHacking Django Channels for Fun (and Profit)
45mKeynote: Architecting with Channels
38mButter smooth, interactive applications with Django...
26mUsing Django 4.2's StreamingHttpResponse and HTMX SSE to provide real time notifications
27mTaking Django Async
