WebSocket Service Builder
advanceddevelopmentMin 32K context
Designs and implements real-time services using WebSockets and Server-Sent Events. Covers connection lifecycle, heartbeats, reconnection with backoff, room/channel fan-out, backpressure, authentication on upgrade, and horizontal scaling with a pub/sub backplane. Produces production patterns for chat, live dashboards, collaborative editing, and streaming updates.
Use Cases
- Building a chat backend with rooms and presence
- Streaming live metrics to a dashboard
- Adding reconnection and heartbeat logic to a flaky client
- Scaling WebSockets across instances with Redis pub/sub
- Choosing between WebSockets and SSE for a use case
Example Prompt
Build a real-time notification service using WebSockets that: 1. Authenticates clients during the upgrade handshake 2. Supports per-user channels and broadcast 3. Sends heartbeats and handles client reconnection with backoff 4. Scales across multiple instances via a Redis backplane 5. Applies backpressure when a client is slow Stack: [describe your language/framework]
Recommended Models
Compatible Tools
claude-codecursorkiroany
Modalities
Input: text, code
→Output: text, code
Related Skills
Author
OpenModels Community