System Design Atlas

Collaborative documents with offline edits

08 / 10Worked example

Investigating bottlenecks

What change state does a snapshot have to record for secure subsequent delivery?

The failure sequence shows where load and retries interact. The diagnostic plan treats measured waiting time, processing duration and business conflicts separately.

Starting point Query the confirmed change state again.

Assumptions for the example case

Our own fictitious example design: A text document with a character sequence and comments; several devices per person; deterministic merging; server-side checked permissions during synchronization. Figures and quality goals are illustrative test assumptions. Outside are table formulas, encrypted end-to-end cooperation and automatic content conflict resolution.

Diagnose the limiting resource

Hotspot, fan-out and convergence separately measure

Sync backlog100/s in D-91
Queue + Fan-outMeasure
Replication errorSame stock, other text
IDs + dependenciesCompare

100 operations/s in D-91 describe load; different text from the same set of changes is a correctness defect.

A long document history delays opening. Create snapshots with an explicit content. Still missing changes remain available.

From signal to action

SignalValidationReaction
Compact history carefullyA long document history delays opening.Create snapshots with an explicit included revision.
Conflicts on the shared entityO-91 and O-92 in both delivery sequences and with duplicates: all confirmed replicas show AXYB. Withdrawal of rights before acceptance rejects the new change; acceptance before withdrawal remains historically confirmed.Count expected conflicts separately from technical errors.
Peak test profile exceeded50 people in a document × 2 = 100 changes/s as a hotspotVery long-offline devices exceed the history retention period.

Compact history carefully

Validation
A long document history delays opening.
Reaction
Create snapshots with an explicit included revision.

Conflicts on the shared entity

Validation
O-91 and O-92 in both delivery sequences and with duplicates: all confirmed replicas show AXYB. Withdrawal of rights before acceptance rejects the new change; acceptance before withdrawal remains historically confirmed.
Reaction
Count expected conflicts separately from technical errors.

Peak test profile exceeded

Validation
50 people in a document × 2 = 100 changes/s as a hotspot
Reaction
Very long-offline devices exceed the history retention period.

Compact history carefully

Compact history carefully

Create snapshots with an explicit included revision.

A long document history delays opening.

Still missing changes remain available.

Alternative considered
Only securing visible text loses dependencies.
Trade-off
Compaction requires device and retention contract.
Reassess
Very long-offline devices exceed the history retention period.

Terms in this step

Compact history carefully
Still missing changes remain available.

Try it yourself

A snapshot contains the visible text but lacks a revision watermark. Explain the problem and the required addition.

A hint for your attempt

Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.

Compare with a possible solution
First part of the solution
Open device changes cannot be reliably related to included or missing history.
Second part of the solution
The snapshot needs an explicit, fully contained change state; re-delivery and compaction depend on it.

Apply to your project

Which corresponding assumption in your project would you check first? Use as an occasion: Very long-offline devices exceed the history retention period.

Step 9 Examined: Received rejected work.