Activating Your Site: A Look at Activity Streams
summary
Shows two working approaches and what actually shipped: django-activity-streams stores actions with generic foreign keys, renders streams at request time, uses prefetch_related to avoid N+1 queries and leaves caching to you; Horizon (Neo4j + Redis + Storm) stores minimal node properties, uses Neo4j for relationship queries, Redis for caching/sockets and Storm/Kafka for precompute topologies. Requires each content model to expose an API endpoint. Covers celebrity-vs-sparsity limits, real-time vs precompute tradeoffs, query limitations of generic FKs, and front-end snippets/streams that cache remote model data.
AI-written summary · about
chapters (24)
- 0:00Diamond Sponsor
- 1:42Activities increase engagement
- 7:16Anatomy of The Spec
- 8:43django-activity-stream
- 10:00Models up close
- 11:24Builtin Streams
- 12:12User Stream Query
- 12:40Custom Streams
- 13:26Custom Stream Query
- 13:49Templatetags
- 15:38DB Problems
- 18:33Storage Considerations
- 19:30Complexity (Neo4j)
- 21:16Apache Storm: Pre-Computation
- 22:47Horizon API
- 23:08Example Call
- 23:45More Examples
- 24:11Direction Matters
- 26:23Horizon Ecosystem
- 27:31My Web Application
- 30:12The Stream
- 31:28Request Response Cycle
- 32:44Engineering Considerations
- 35:19Open Source
related talks
26mDjango 5.0: Elevating Experiences with Server-Sent Events – A Journey from Polling to Real-Time Vibe
22mDjango Channels Teaching a mature framework new tricks
26mUsing Django 4.2's StreamingHttpResponse and HTMX SSE to provide real time notifications
35mStreaming Messages from Temporal Workers
23mDeliver real-time data to customer using Streaming APIs
29mSwiss Army Django: Small Footprint ETL
23mImplications of the Realtime Web
31mStreaming: Real-Time Architecture for Connected Products in Automotive
