sync_pilot 0.1.0
sync_pilot: ^0.1.0 copied to clipboard
A database-agnostic, offline-first synchronization engine for Dart and Flutter featuring smart outbox compaction, field-level conflict resolution, delta sync, and exponential backoff retry.
0.1.0 #
- Initial release of
sync_pilot. - Added
SyncPilotEngine<T>for database-agnostic, offline-first synchronization. - Added
OutboxQueuewith automatic operation compaction (squashing redundant creates, updates, and deletes while offline). - Added optimistic temporary ID mapping (
temp_123->srv_999) with automatic rewriting of local records, subsequent outbox mutations, and cross-table foreign keys viaSyncCoordinator. - Added batch push support (
enableBatchPush,pushBatchSize, andRemoteSyncAdapter.pushBatch). - Added pluggable
ConflictResolver<T>with built-in strategies:ServerWinsClientWinsLastWriteWinsFieldLevelMerge(3-way and changed-field JSON merging)Customcallback resolver
- Added ready-to-use storage and transport adapters:
RestSyncAdapter<T>(REST/Dio/HTTP with partialPATCH,409 Conflictparsing, and retry classification)SqlSyncStore<T>andSqlOutboxStorage(SQLite/sqflite/sqlite3/Drift)KeyValueSyncStore<T>andJsonStringOutboxStorage(Hive/SharedPreferences)
- Added
SyncPayloadCodec(custom,xorBase64,chained/.then()) for at-rest encryption and compression of local store and outbox payloads. - Added paginated delta synchronization (
RemoteDeltaPage) with checkpoint persistence. - Added
RetryPolicywith configurable exponential backoff and jitter. - Added reactive streams for data observation (
watchAll,watchById), engine status (statusStream), ID mappings (idMappingStream), and per-record sync state (getRecordSyncState).