WebSocket Service Builder

高级development最低上下文:32K

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.

使用场景

  • 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

示例提示词

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]

推荐模型

兼容工具

claude-codecursorkiroany

模态

输入: text, code
输出: text, code

相关 Skills

作者

OpenModels Community

@openmodelsrun