~/talk

Django 5.0: Elevating Experiences with Server-Sent Events – A Journey from Polling to Real-Time Vibe

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [web-platform, python]
links:none on file
slides:none on file

Shows how Django 5.0 uses Server-Sent Events + async streaming HTTP responses to replace polling without rewriting the sync app, handling disconnections and cleanup now supported in 5.0; uses plain JavaScript EventSource and htmx on the client, a separate async service that listens to a common channel implemented with Redis Streams, and a Mastodon firehose demo. Local dev works with Daphne; rough load test on a tiny Render instance yields ~500 polling connections vs ~150–200 SSE+Redis streams.

AI-written summary · about

  1. 0:00Introduction and concepts
  2. 1:48Event stream format
  3. 4:10Implementing SSE in Django
  4. 6:48Local development setup
  5. 8:24Real-time use cases
  6. 11:02Architecture for real-time
  7. 13:52Integrating Redis streams
  8. 16:16Backend stream listening
  9. 17:42Frontend implementation
  10. 18:47SSE versus websockets
  11. 21:15Performance and Q&A
~/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.