Reader's Guide: Overview
This section covers everything a reader needs to know: how to query entities, subscribe to changes, handle bootstrap, recover from disconnections, and build correct local state.
Reader lifecycle
Section titled “Reader lifecycle”A typical reader follows this lifecycle:
-
Resolve the kind. Call
ResolveKindAsync<T>()to get aKindHandle<T>without mutating the server’s schema. If the kind’s schema has evolved since your code was compiled (new fields added by the writer), resolution still succeeds. Your reader simply will not see the new fields. See Schema Evolution for details. -
Subscribe. Call
SubscribeAsyncon the handle for each entity kind of interest. Choose whether to request a bootstrap snapshot and which reconnection strategy to use. -
Bootstrap. If bootstrap was requested, the server sends a snapshot of all existing entities before transitioning to live notifications. Process all notifications using version-wins merge regardless of type.
-
Live. After bootstrap completes, the subscription delivers real-time
Created,Updated, andDeletednotifications as entities change. -
Disconnect. If the connection is lost, the SDK automatically reconnects with exponential backoff. During the disconnection, changes may be missed.
-
Reconnect. On reconnection, subscriptions are automatically re-established. Depending on the configured
ReconnectBootstrapMode, the server either resumes live-only (accepting a gap) or performs a full re-bootstrap (ensuring no drift).
Pages in this section
Section titled “Pages in this section”| Page | What it covers |
|---|---|
| Point Reads (Query) | Single-entity lookups by ID, query status, and entity ID helpers. |
| Subscriptions | The subscription model, notification types, filtering, and backpressure. |
| Bootstrap | Server guarantees during bootstrap, duplicate handling, version-wins merge, and detecting bootstrap completion. |
| Reconnection | ReconnectBootstrapMode, BootstrapState lifecycle, manual re-bootstrap, and the full reconnection flow. |
| Change Tracking | ChangedFields bitmask, PreviousEntity, and field-level diff detection. |
| Event Streams | Per-operation event notifications for auditing, replay, and per-source tracking. |
| Building Correct State | End-to-end patterns for mirror databases, event-driven processing, and one-shot snapshots. |