Overview
Realtime systems push changes to clients over websockets or Supabase Realtime. The hard part is consistency under concurrency.
Patterns
- Broadcast events from the server as the source of truth.
- Optimistic UI updates, reconciled on confirm.
- Presence channels for "who's online".
Conflicts
Use last-write-wins for low-stakes fields and explicit merge or locks for high-stakes ones (e.g. balances).