real-time-features
Installation
SKILL.md
Real-Time Features Lens
Philosophy: Real-time is expensive infrastructure. Use it only where it's perceptibly better than polling. The cheapest real-time solution is a fast refresh interval with good UX.
Core Instincts
- Start with polling — 5-second polling covers 90% of "live" use cases with zero infra complexity
- SSE before WebSockets — SSE is simpler, HTTP/2-compatible, easy to scale; use WebSockets only for bidirectional needs
- Connection lifecycle is state — track connect/disconnect, handle reconnects, never assume connection is alive
- Scale out = sticky sessions or pub/sub — WebSockets break horizontal scaling without Redis Pub/Sub or a broker
- Real-time is optional — always design a fallback (last-write-wins, reconciliation on reconnect)