Realtime

From rnavarych/alpha-engineer · View interactive version

Realtime is an AI agent skill from the GitHub repository rnavarych/alpha-engineer. Real-time patterns: SSE with Redis Pub/Sub and heartbeat, Socket.IO with Redis adapter for multi-server, Supabase Realtime CDC, WebSocket reconnection with exponential backoff, choosing SSE vs WebSockets vs polling. Use when building live updates, notifications, collaborative features, real-time das

How to use this skill

Skill file

Real-Time Patterns

When to use

Core principles

  1. SSE for server-to-client — simpler than WebSockets, auto-reconnects, HTTP/2 multiplexed
  2. WebSockets for bidirectional — when client sends frequent messages (chat, multiplayer)
  3. Redis Pub/Sub for multi-instance — events published on one server must reach all clients
  4. Always heartbeat — detect stale connections; proxies and load balancers kill idle connections
  5. Exponential backoff on reconnect — avoid stampede when server restarts

References available

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.