sync_engine 0.1.0
sync_engine: ^0.1.0 copied to clipboard
Pure-Dart CRDT primitives and synchronization protocol foundations.
sync_engine #
Pure-Dart, immutable CRDT primitives for flutter_sync_engine. It can be
tested with dart test and deliberately has no Flutter dependency.
LWW conflict resolution #
LWWRegister uses vector clocks for causal order. If two writes are
concurrent, it selects the value from the lexicographically greater node ID.
That rule is deterministic but arbitrary; applications needing domain-specific
resolution should provide it above this primitive.
SyncEngine serializes sync cycles, validates transport acknowledgements, and
keeps the outbox cursor from advancing when a push fails. Durable persistence
is provided by sync_engine_drift; the core package ships the outbox contract
and in-memory implementation.