Connected Products

Offline Products Need a Reconciliation Contract

• Christopher Mitchell •6 min

Offline products need visible local state, durable intent, conflict rules, staged reconnection, and receipts that prove which changes reached shared truth.

A field technician closes three inspections in a basement with no signal. The tablet shows green checkmarks. Two hours later, connectivity returns and one inspection disappears because another person edited the same asset.

The application worked offline. The workflow did not survive reconnection.

Offline support is more than a local cache and a queue. It is a promise about what users may trust before the server can agree, how competing changes are resolved, and what evidence remains afterward.

Separate local success from shared truth

A tap can succeed on the device while the resulting business action remains unsettled. The interface should preserve that distinction.

Use explicit states such as local draft, queued, synchronizing, synchronized, conflicted, rejected, and expired. A green confirmation should mean the state the product actually reached. If the change is only durable on one device, say so.

That wording matters for consequential work. “Saved on this device” is honest. “Inspection submitted” is premature when the server has not checked authorization, current asset state, required fields, or duplicate work.

Cloud Firestore illustrates the technical boundary. Its offline persistence can read and write cached data, then synchronize local changes after connectivity returns. For multiple changes to the same document, the documented rule is last write wins.

That may fit preferences or low-risk notes. It can be dangerous for inventory counts, medication administration, approvals, prices, and safety findings. Offline capability does not select the correct business rule by itself.

Preserve intent, not only the latest object

An offline queue should record what the user tried to do and the state they saw at the time.

Store an operation identifier, actor, device, local time, monotonic order, base version, object identifier, changed fields, policy version, and required authorization context. Keep enough information to distinguish “set quantity to 12” from “add 2 to quantity.” Those operations reconcile differently.

I call a queue that retains only the latest object sync amnesia. It remembers a result without remembering the decisions that produced it.

Intent also supports safe replay. Each operation needs an idempotency key or equivalent identity so a reconnect, application restart, or uncertain response cannot create the same work twice.

Do not assume the device clock establishes global order. Tie local edits to a base revision and preserve device sequence separately. This extends the clock contract for connected products, where offline timestamps need provenance before they become operational evidence.

Choose conflict rules by consequence

There is no universal merge policy.

Apache CouchDB demonstrates why a deterministic winner is not the same as a resolved business conflict. Replication can select one revision for ordinary reads while retaining competing revisions. The application still has to merge, reject, or present those alternatives to a person.

Define policy by field and operation:

AWS AppSync makes the choices concrete. Its versioned data sources can use optimistic concurrency, automatic merge rules, or custom Lambda resolution. Its automatic behavior differs for scalars, lists, sets, and maps. That is useful machinery, but the product still owns whether those rules fit the workflow.

Automatic merging should produce an explanation. A technician who entered a value offline needs to know whether it was accepted, combined, replaced, or rejected. Silent resolution turns a conflict algorithm into an invisible editor.

Reconnect in controlled stages

Connectivity returning is an event, not proof that synchronization finished.

First refresh identity, authorization, policy, schema, and server time. Then retrieve relevant changes made elsewhere. Compare queued operations with current versions. Apply safe operations in dependency order and pause work that needs review.

Do not release the entire backlog at once. Large queues can overwhelm the network, drain a battery, trigger rate limits, or submit child records before their parents exist. Use bounded batches, priority, retry limits, and resumable checkpoints.

The user should be able to keep working while reconciliation continues, but new actions must reflect uncertainty. If an asset has an unresolved conflict, the product may allow another note while blocking a final approval.

Security changes need explicit treatment. A queued edit may no longer be authorized because the user changed roles, the device was revoked, or the account was suspended. Rejection is correct, but the product should preserve a reviewable record long enough to explain and recover legitimate work.

Issue a reconciliation receipt

After synchronization, summarize the outcome at both operation and session level.

Show counts for accepted, merged, duplicate, conflicted, rejected, expired, and still pending work. For every exception, include the local operation, server version, resolution rule, final state, and next action. Sensitive values can be redacted without hiding the decision.

Make the receipt durable and support-accessible. A disappearing toast cannot settle whether yesterday’s inspections reached the system of record.

Measure queue age, synchronization latency, retry volume, conflict rate, automatic-merge reversals, duplicate prevention, rejected authorization, unresolved work, and users who leave before reconciliation completes. Segment by workflow and device version.

Test airplane mode, intermittent links, process termination, device reboot, clock changes, expired credentials, schema upgrades, full storage, duplicate reconnects, and two devices editing the same record. Test a backlog large enough to expose ordering and capacity problems.

Offline mode creates a temporary branch of product truth. A trustworthy product labels that branch, preserves its intent, and reconciles it visibly when shared authority returns.

Sources

Comments

Comments are powered by GitHub Discussions through Giscus.

← All MitchellCo Notes