Skip to content

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.

A typical reader follows this lifecycle:

  1. Resolve the kind. Call ResolveKindAsync<T>() to get a KindHandle<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.

  2. Subscribe. Call SubscribeAsync on the handle for each entity kind of interest. Choose whether to request a bootstrap snapshot and which reconnection strategy to use.

  3. 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.

  4. Live. After bootstrap completes, the subscription delivers real-time Created, Updated, and Deleted notifications as entities change.

  5. Disconnect. If the connection is lost, the SDK automatically reconnects with exponential backoff. During the disconnection, changes may be missed.

  6. 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).

PageWhat it covers
Point Reads (Query)Single-entity lookups by ID, query status, and entity ID helpers.
SubscriptionsThe subscription model, notification types, filtering, and backpressure.
BootstrapServer guarantees during bootstrap, duplicate handling, version-wins merge, and detecting bootstrap completion.
ReconnectionReconnectBootstrapMode, BootstrapState lifecycle, manual re-bootstrap, and the full reconnection flow.
Change TrackingChangedFields bitmask, PreviousEntity, and field-level diff detection.
Event StreamsPer-operation event notifications for auditing, replay, and per-source tracking.
Building Correct StateEnd-to-end patterns for mirror databases, event-driven processing, and one-shot snapshots.