← all projects

offline-sync-engine

A small, tested engine for offline-first mutations: durable operation queue, exponential backoff with jitter, pluggable per-operation conflict resolution.

View on GitHub ↗Kotlinupdated 4d ago

KotlinWorkManager

High-level design

The general-purpose version of the sync engine wired into argent-android — a durable queue that assumes the network will fail.

operation queue

durable, survives process death

backoff policy

exponential with full jitter, so a whole fleet doesn't retry in lockstep

conflict resolver

pluggable per operation type — no single global merge rule

Low-level design

9 tests, standalone — no Android dependency in the core.

  • Retry ceiling is explicit — an operation moves to Failed rather than retrying forever
  • Conflict strategy is chosen by operation type at registration time, not inferred at runtime