Document DB v7: Temporal Support and Telemetry Collections! Feed The Machine Here
Data Sync Releases
1.0 — preview
Section titled “1.0 — preview”The library was redesigned from the ground up to match the platform-tier guarantees of Shiny.Net.Http. The new package is Shiny.Data.Sync (note the dot — Shiny.DataSync was the previous, retired SQLite-based prototype). The API and packaging are not compatible with the older version.
Feature
Outbox / inbox engine with platform-aware transports — iOS / Mac Catalyst on background
NSURLSession, Android on a foreground service, Windows / Linux / macOS / base .NET on HttpClient + connectivity loop, Blazor WASM on HttpClient + LocalStorage Feature
IDataSyncManager with Queue<T>, PullNow<T>, PullAll, GetPending, Cancel, CancelAll<T>, and CancelAll — operations are persisted per-app-launch and resume on relaunch Feature
ISyncEntity contract — a single Identifier property; no base classes, no attributes required Feature
Per-endpoint
SyncDirection: Both (default), PullOnly, PushOnly Feature
Batch = true per endpoint — coalesces queued ops with last-write-wins semantics (Create + Update(s) → single Create with latest payload; trailing Delete wins) and POSTs a single /batch request Feature
Pull throttling via
MinPullInterval (scheduled pulls skip; PullNow<T> bypasses) and configurable cursor parameter (CursorParameter, default since) Feature
Per-verb URL overrides (
PullUrl, BatchUrl) and metered-connection gating (UseMeteredConnection) Feature
Exponential backoff with persisted
NextAttemptAt — MaxAttempts (default 5) and RetryBaseDelay (default 2s) per endpoint, capped at 60s, transient on 0 / 408 / 429 / 5xx Feature
Conflict resolution with
ConflictPolicy (AskDelegate / ServerWins / ClientWins) and delegate-driven ConflictResolution.AcceptRemote / KeepLocal / UseMerged Feature
Three removal strategies:
Verb = Delete items in the inbox, separate TombstoneUrl stream (string[] or { cursor, ids }), and client-side SoftDeletePredicate / ExpiryPredicate Feature
ISyncInterceptor for global request hooks (auth, signing, tracing) — runs before per-endpoint OnBeforeSend so endpoint logic still wins on header conflicts Feature
Unified
Activity event stream surfacing OutboxQueued / OutboxStarted / OutboxSent / OutboxFailed / OutboxConflict / OutboxRetryScheduled / OutboxCanceled / InboxPullStarted / InboxItemReceived / InboxPullCompleted / InboxPullFailed / TombstonesApplied Feature
Typed events kept for fine-grained subscribers:
PendingCountChanged, UpdateReceived (per-op state transitions), PullCompleted (per-endpoint completion) Feature
AOT-safe JSON via
[ShinyJsonContext] source-generated module initializer wiring entities into the shared Shiny.Json.Default chain — no per-endpoint JsonTypeInfo plumbing Feature
SyncJob auto-registered with WithInternet(InternetAccess.Any) — periodic PullAll runs in the background without any manual AddJob registration Feature
Named HttpClient
RestSyncTransport.HttpClientName ("Shiny.Data.Sync") — attach base address, Polly handlers, and signing handlers with IHttpClientFactory Feature
Custom transports via
ISyncTransport — replace the default REST transport with gRPC, GraphQL, or anything else Feature
Shiny.Data.Sync.Blazor for Blazor WebAssembly — LocalStorage-backed persistence and connectivity-driven HttpClient loop