tom_core_sync 0.1.0
tom_core_sync: ^0.1.0 copied to clipboard
Keyed three-way merge and background sync for Tom applications: a record codec contract, conflict records, a history store with retention, and a sync engine and scheduler that keep containers converge [...]
Changelog #
0.1.0 #
Added #
- The keyed three-way merge.
tomMergeKeyedover aTomRecordCodec(key, stamp, canonical bytes): a key only one side changed takes that side, the same change on both sides is no conflict, an edit against a deletion keeps the edit — silently or reported (TomDeleteEditPolicy) — and two different edits go to the newer stamp, a tie settled byTomMergeTie, with the loser on theTomMergeConflict. Copies of different major formats are refused withTomMergeRefusedExceptionbefore anything is compared.tomMergeConflictOfbuilds a conflict over a triple a caller holds. - Conflict records.
TomSyncConflict, the anchor every queued conflict shares, andTomConflictRecord, which keeps the unsettled key, the loser's locator and the loser across a save and a reopen. - History. The
TomHistoryStoreport,tomHistoryDepth(20) andtomHistoryStamp;TomMediumHistoryStorekeeps versions as files in aTomBundleMedium, prunes per record and never removes a protected version or a path it is told to leave alone. - The sync loop.
TomSyncUnit,TomSyncEngine(state machine, pull, merge and compare-and-swap push through the unit, edit coalescing, the offline journal, total transport verdicts, onesync.cyclediagnostics event per cycle),TomSyncStateandTomSyncStatus;TomSyncSchedulerwith one batched head read per backend per tick, per-backend waits (TomSyncDeferral), retry members (TomSyncRetry) and aTomSyncPolicy(TomFixedSyncPolicy,TomSyncDirection);TomCasExhaustedExceptionandTomCommitFailedException.