Streaming Messages from Temporal Workers
summary
Architecture sends real-time notifications and streaming LLM tokens from Temporal workflows to users via SSE, using Redis pub/sub for low-latency fan-out, FastAPI + Starlette-SSE for HTTP delivery, and Gemini GenAI for streamed content. Redis pub/sub proves at-most-once and non‑durable, so durable replay uses either Redis Streams or Temporal Workflow Streams with monotonic indices rather than UUIDs; implement simple side‑car publish activities, emit keepalive pings, support last-event-id for resumption, and prefer HTTP/2 to avoid connection limits.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:49Why Temporal at Washington Post
- 3:36Redis Pub/Sub solution
- 7:25Workflow demo overview
- 10:16Temporal workflow code
- 12:00Demo and failure handling
- 16:13API layer and SSE handling
- 21:06Trade-offs and durability
- 24:34Ordering and replayability
- 27:02Mobile push misconceptions
- 28:29Workflow Streams vs Pub/Sub
- 30:58HTTP considerations
- 33:50JavaScript client tips
- 34:10Recap and resources
related talks
42mUsing Temporal Workflows for Seamless Dev + Research Collaboration & Continuous Algo D
43mLLMs in the Wild - Streaming, RAG, and Real Time GenAI at Scale
23mDeliver real-time data to customer using Streaming APIs
24mDurable Agents: long running AI workflows in a flakey world
31mStreaming: Real-Time Architecture for Connected Products in Automotive
29mAPIs and Event Streaming Dualty
15mGraphQL Subscriptions in Production Is Easy Isnt It?
34mGraphQL real-time subscriptions
