realtime-websockets

Solid

Use when building realtime features with WebSockets or Server-Sent Events. Covers protocol choice, connection lifecycle, reconnection and backfill, scaling across instances, and backpressure.

Web & Frontend 23 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
46
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Realtime and WebSockets ## Purpose Build realtime features that behave correctly when the connection drops — which it will, constantly, on mobile networks. The hard part is not the socket; it is the state after the reconnect. ## When to Use - Building live updates, chat, presence, collaborative editing, or streaming dashboards. - Choosing between WebSockets, SSE, and polling. - Scaling a socket server beyond one instance. - Diagnosing memory growth or dropped messages under load. ## Capabilities - Protocol selection and trade-offs. - Connection lifecycle: handshake, auth, heartbeat, graceful close. - Reconnection with resume tokens and gap backfill. - Horizontal scaling with a pub/sub fan-out layer. - Backpressure and slow-consumer handling. ## Inputs - Direction of data flow (server to client, or bidirectional). - Message volume, size, and acceptable latency. - Whether missed messages must be recovered or can be dropped. ## Outputs - A protocol choice with a stated reason. - A reconnect path that restores correct state, not just a live socket. - A scaling design that works with more than one server instance. ## Workflow 1. **Choose the simplest protocol that works** — Server-to-client only? Use SSE: it is plain HTTP, reconnects automatically, and passes through proxies. Bidirectional and low-latency? WebSockets. Infrequent updates? Polling is not embarrassing. 2. **Authenticate at the handshake** — Validate the token on connect; re-validate periodically for lon...

Details

Author
nimadorostkar
Repository
nimadorostkar/Claude-Skills-collection
Created
1 weeks ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category