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 26 stars 3 forks Updated 3 weeks ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
48
Recency 20%
90
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 months ago
Last Updated
3 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Listed

realtime-websockets

Build production realtime servers over WebSockets and Server-Sent Events — connection lifecycle, the heartbeat/ping-pong + idle-timeout contract, automatic reconnection with exponential backoff and resume tokens, backpressure and per-connection send queues, horizontal scale-out via a Redis/NATS pub-sub fan-out, presence tracking, and auth on the upgrade handshake. Use when adding live updates (chat, notifications, collaborative cursors, live dashboards), choosing WebSocket vs SSE vs long-poll, debugging dropped or zombie connections, or scaling a socket server past one node. Boundary vs api-design — api-design owns request/response HTTP contracts (REST/GraphQL, idempotency, RFC 9457 errors) and stops at the protocol-upgrade boundary; this skill owns the persistent bidirectional connection after upgrade. Carries higher-level subscription protocols (e.g. graphql-ws) as transport but defers their payload schema to graphql.

6 Updated yesterday
kouroshez
AI & Automation Listed

websocket-engineer

Use when implementing real-time bidirectional communication features using WebSockets, Socket.IO, or similar technologies at scale.

2 Updated 1 months ago
risadams
Web & Frontend Listed

serve-realtime-with-websockets

Use when pushing realtime updates to connected clients over WebSockets (a socket.io / WS gateway) — authenticating the socket at the handshake (once, not per message), joining sockets to rooms for targeted broadcast, scaling across instances with a Redis pub/sub adapter (+ sticky sessions), bridging domain events to room emits, and connection-lifecycle hygiene (reconnect, listener cleanup). NestJS/socket.io reference, framework-flexible.

1 Updated 1 months ago
kennguyen887