System Design Atlas

Mining operations with intermittent connectivity

07 / 10Worked example

Critical flow

What evidence remains for a work order after a response is lost, and what may happen next?

The architecture is now tested at its critical failure point. After a connection interruption, the gateway resends events. The API stores the report and validation result before acknowledging it. A gap in the device sequence keeps completion open; the shift supervisor receives the conflicting work-order state together with the original report.

Starting point The local gateway buffers independently of the central system.

Assumptions for the example case

A fictional example design for offline documentation of previously authorised routine work, with separate safety procedures. Zone information is marked stale from age 300 seconds; this does not authorise entry or work. All figures and test targets are illustrative assumptions.

Critical flow with commit and failure point

Critical flow with commit

1
Offline zone with device → Local device journalSigned action record
2
Local device journal → Synchronization processingOriginal sequence of events
3
Synchronization processing → Shift work order APIEvidence + received revision
4
Shift work order API → Relational central datastoreAccept durably
5
Relational central datastore → Synchronization processingAssigned revision

An offline report records an action against the received revision and grants no authorisation.

After a connection interruption, the gateway resends events. The API stores the report and validation result before acknowledging it. A gap in the device sequence keeps completion open; the shift supervisor receives the conflicting work-order state together with the original report.

Ordering and failure outcomes

Required order
After a connection interruption, the gateway resends events. The API stores the report and validation result before acknowledging it. A gap in the device sequence keeps completion open; the shift supervisor receives the conflicting work-order state together with the original report.
Crash before commit
No new durable evidence exists yet for work order A-35. The same command may be checked again; unconfirmed intermediate work provides no business guarantee.
Crash after commit, before response
The command journal entry records the original result. Identical replay returns that evidence; a fresh view of the current state comes from the read contract.
External uncertainty
A missing response from the local gateway leaves the outcome unknown. Confirmed acceptance, definite rejection and missing evidence receive distinct states; the responsible role investigates using the same reference.

Acknowledge only after durable acceptance

Acknowledge only after durable acceptance

Acknowledge only after durable acceptance.

After a connection interruption, the gateway resends events. The API stores the report and validation result before acknowledging it. A gap in the device sequence keeps completion open; the shift supervisor receives the conflicting work-order state together with the original report.

An offline report records a claimed action against the received work order revision; it grants no new safety authorisation or work permission. The exercise specifies the input and expected result.

Alternative considered
Submitting a new request after a response is lost can execute the same business operation again.
Trade-off
Missing evidence from the local gateway requires a worklist.
Reassess
Frequent unresolved outcomes require a more reliable contract for external reconciliation.

Try it yourself

Mark the commit point, failure point and next permitted action. Explain the effect of an identical retry.

A hint for your attempt

Trace the same request through the datastore and response path.

Compare with a possible solution
Flow and failure
After a connection interruption, the gateway resends events. The API stores the report and validation result before acknowledging it. A gap in the device sequence keeps completion open; the shift supervisor receives the conflicting work-order state together with the original report.
Commit and replay
The business change and command result are stored together before the response. If the response is lost after commit, read this result. Work order A-35 receives no second effect.

Apply to your project

What feedback could be missing even though the underlying action has already taken place?

Next, diagnose connectivity and processing separately.