System Design Atlas

Water leak detection and repair orders

06 / 10Worked example

The overall architecture

What data connects time series and repair process?

The data contract leads to this runtime topology: Measuring station → measurement ingestion → time-series store → suspected leak worker. Control room interface → findings API → findings and work order store. Field service device with a local queue ↔ findings API. Network documentation supplies versioned metering-zone assignments; the post-repair inspection worker links new measurements to the open repair order. Internal modules are domain code boundaries; a separate process has its own operational lifecycle.

Starting point Store exactly one active order per finding.

Assumptions for the example case

This fictional worked design assumes a bounded metering zone, minute-by-minute flow readings, manual confirmation of findings and one active repair order per confirmed finding. Numbers and quality targets are illustrative test assumptions. Automatic valve control, full hydraulic simulation and drinking water quality assessment are outside scope.

Runtime architecture

Runtime architecture · time series and finding records

Measuring stationMinute values
Control room interfaceFindings
Field service deviceLocal queue

Water network platform

Measurement ingestionSequence + Quality
Time-series datastoreMinute values
Suspected leak workerThree-reading sequence
Findings APIInvestigation + Order
Findings and work order storeB-111 · R-111
Post-repair inspection workerMeasurement after repair
Network documentationMetering-zone version
Measuring station → Measurement ingestionValue + quality
Measurement ingestion → Time-series storeCommit sequence
Time-series store → Suspected leak workerValid minute sequence
Control room interface → Findings APIConfirm finding
Field service device → Findings APISynchronise offline evidence
Findings API → Findings and work order storeB-111 + R-111
Network documentation → Findings APIZone version
Time-series store → Post-repair inspection workerNew readings
Findings and work order store → Post-repair inspection workerOpen work order
Post-repair inspection worker → Control room interfaceSubmit inspection evidence for review
Control room interface → Findings APIConfirm restoration or assign remedial work

Suspected leak detection reads measurements; the findings API manages the work order; post-repair inspection links both stores through the open repair case.

Measurements and repairs have different lifecycles. Store the time series separately and reference the finding evidence. Millions of readings do not overwhelm the work order view.

Domain modules within the application

Inside the findings process · five responsibilities

Measurement qualitySequence + identifier
Suspected leak detectionValid minutes
Finding assessmentInvestigation + Cause
Repair orderAssign R-111
Post-repair inspectionProof of restoration

Measurement quality and suspected leaks lead to investigation; work orders and post-repair inspection separate work evidence from closure evidence.

Measurement quality checks sequence, time and quality flags. Suspected leak detection evaluates valid minute readings. Finding assessment documents investigation and cause. Repair orders assign work and field service ownership. Post-repair inspection links repair to evidenced restoration.

Operational boundaries

Runtime
Measuring station → measurement ingestion → time-series store → suspected leak worker. Control room interface → findings API → findings and work order store. Field service device with a local queue ↔ findings API. Network documentation supplies versioned metering-zone assignments; the post-repair inspection worker links new measurements to the open repair order.
Persistence
Transactional store for measuring station M-111, suspected leak V-111 and finding B-111. The authoritative domain change and its retry result are stored together; external effects require separate evidence.

Connect time series and work orders

Connect time series and work orders

Keep the time series separately and reference the finding evidence.

Measurements and repairs have different life cycles.

Millions of values do not overload the order view.

Alternative considered
All raw values in the order make processing more difficult.
Trade-off
Preserve historical assignment versions.
Reassess
Long-term evidence needs archival access.

Terms in this step

Connect time series and work orders
Millions of values do not overload the order view.

Try it yourself

Assign raw measurements, the finding and the repair order to their datastores.

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
Raw values with measurement time and quality are in the time-series store.
Second part of the solution
The finding and work status reside in the work order store and reference the evidenced measurement range and its network assignment.

Apply to your project

Which corresponding assumption in your project would you check first? Consider this trigger: Long-term evidence needs archival access.

Step 7 examines: accept offline evidence.