WebSockets: The Real-Time Avengers
summary
Live code builds a real-time voting app using WebSockets over Cloudflare Workers and Durable Objects, showing a working two-client demo that updates both browsers instantly. Demo uses a copy of the docs template, switches to party-server to reduce boilerplate (claimed ~12 lines), adds per-room routing, and persists counts to KV storage so votes survive restarts. Setup runs in roughly 15–18 minutes of demo time and successfully broadcasts votes and room-scoped messages.
AI-written summary · about
chapters (9)
- 0:00Introduction to WebSockets
- 2:42Limitations of old real-time tech
- 5:15How WebSockets work
- 7:20Building a WebSocket server
- 12:39Live demo setup
- 15:54Enhancing the demo with PartyKit
- 20:14Frontend integration
- 23:51Adding persistent storage
- 28:05Conclusion and resources








