Application patterns
State synchronization
State synchronization keeps a client's view aligned with authoritative application data by combining initial reads, live updates and recovery after gaps or conflicts.
Also found under: Live dashboard, Snapshot, Reconciliation
How it works
A common approach loads a snapshot and then applies events with record IDs or versions. Coordinate subscription and snapshot timing so changes during initialization are not silently lost. When the client cannot safely apply an update, fetching fresh state is often simpler than reconstructing every missing step.
In a Pubb integration
Use Pubb for change notifications and your backend for the source of truth. Refresh state after reconnecting and define how stale events interact with newer API responses.
Connect a clientA practical example
A dashboard subscribes, fetches current totals and reconciles buffered versioned updates. After an offline period, it fetches a new snapshot before resuming normal live updates.