Final design
Which tests verify concurrency protection and collection-route completion in the overall architecture?
The final design reuses the full topology from step 6. Inside the system boundary, the interface calls the collection route API, which accesses route assignments, bin-emptying events and handover records. Device synchronisation reads durable work from that store. The receiving facility is external. Processing receives or sends the business messages described in the main flow, and results reach the interface through the collection route API. The test plan covers concurrency, retries, limits and terminal completion for collection route T-38. The table lists expected results; execution evidence is still outstanding.
Starting point Completion requires an accountable chain of evidence.
Assumptions for the example case
Original fictional example design. A municipal collection service for non-hazardous waste uses its own operational records and confirmed handovers. The illustrative load limit is 10000 kg; additional planned loading is allowed only if total mass remains ≤ 10000 kg. All figures and test targets are illustrative assumptions.
Overall architecture with checks and review loops
Runtime topology
- 1 · Vehicle with local journal → Device synchronisation
- 2 · Device synchronisation → Collection route API
- 3 · Collection route API → Relational assignment store
- 4 · Relational assignment store → Record completion
- 5 · Receiving facility → Record completion
Route and records system
Each emptying takes effect once per bin and route. Completion requires a handover record and resolved discrepancies.
Test plan for the complete design
| Component | Test and expected result | Return to an earlier step |
|---|---|---|
| Collection route API | Two devices report the same route-and-bin work order: in either order, exactly one emptying is accepted. Conflicting content creates an investigation case instead of a second emptying. | Steps 3 and 5 |
| Command journal | Identical retries take effect once; changed content produces a conflict. | Steps 4 and 7 |
| Domain boundary check | Test 9999, 10000 and 10001 kg. Expected result: the illustrative load limit is 10000 kg; additional planned loading is allowed only if total mass remains ≤ 10000 kg. | Step 2 |
| Route assignments, bin-emptying events and handover records | After abgeschlossen, replay increases neither the count nor the mass. New conflicting evidence opens a linked correction case and leaves the completion record unchanged. | Steps 5 and 9 |
| Device synchronisation | The device sends a locally stored bin-emptying record. The collection route API checks the route-and-bin assignment and event identity, then acknowledges only after commit. A second report with a different mass is stored as a discrepancy; the receiving facility later confirms the actual total load. | Steps 6 and 7 |
Collection route API
- Test and expected result
- Two devices report the same route-and-bin work order: in either order, exactly one emptying is accepted. Conflicting content creates an investigation case instead of a second emptying.
- Return to an earlier step
- Steps 3 and 5
Command journal
- Test and expected result
- Identical retries take effect once; changed content produces a conflict.
- Return to an earlier step
- Steps 4 and 7
Domain boundary check
- Test and expected result
- Test 9999, 10000 and 10001 kg. Expected result: the illustrative load limit is 10000 kg; additional planned loading is allowed only if total mass remains ≤ 10000 kg.
- Return to an earlier step
- Step 2
Route assignments, bin-emptying events and handover records
- Test and expected result
- After abgeschlossen, replay increases neither the count nor the mass. New conflicting evidence opens a linked correction case and leaves the completion record unchanged.
- Return to an earlier step
- Steps 5 and 9
Device synchronisation
- Test and expected result
- The device sends a locally stored bin-emptying record. The collection route API checks the route-and-bin assignment and event identity, then acknowledges only after commit. A second report with a different mass is stored as a discrepancy; the receiving facility later confirms the actual total load.
- Return to an earlier step
- Steps 6 and 7
First end-to-end test and outstanding evidence
- End-to-end path
- Test duplicate reports and a different accepted mass end to end. The device sends a locally stored bin-emptying record. The collection route API checks the route-and-bin assignment and event identity, then acknowledges only after commit. A second report with a different mass is stored as a discrepancy; the receiving facility later confirms the actual total load.
- Clarify before extending the scope
- Agree the real contract with the receiving facility, retention periods, recovery targets and assigned roles. Every limit here is a design assumption. The evidence table describes tests to execute; technical integration, browser checks and comprehension checks with readers follow separately.
Test duplicate reports and a different accepted mass end to end
Test duplicate reports and a different accepted mass end to end.
A collection vehicle records bin emptying while offline. When it reconnects, reports arrive twice and out of order. Completion requires technical and business evidence.
Two devices report the same route-and-bin work order: in either order, exactly one emptying is accepted. Conflicting content creates an investigation case instead of a second emptying. The exercise specifies the input and expected result.
- Alternative considered
- An initial end-to-end path limited to lists and forms postpones the critical state checks.
- Trade-off
- The first end-to-end path needs controlled concurrency and failure points.
- Reassess
- Passing the counterexample tests and checks with readers provides grounds for extending the case.
Try it yourself
Choose two architectural decisions: concurrency protection and evidence-backed completion. For each, name the test, expected result and step to revisit.
A hint for your attempt
Link the markers of the overall architecture with the associated design steps.
Compare with a possible solution
- Concurrency control
- Two devices report the same route-and-bin work order: in either order, exactly one emptying is accepted. Conflicting content creates an investigation case instead of a second emptying. The invariant must hold: each confirmed emptying takes effect once for the same bin and route work order, and route completion requires documented handover status and resolved discrepancies. A failure leads back to step 5 and the command contract in step 4.
- Test completion and retries
- Starting point: a completed route has a confirmed emptying with documented mass and handover evidence. Replay the identical emptying record twice, then submit a new conflicting record for the same route-and-bin work order. Expected result: the completed count and mass remain unchanged; replay returns the same record; the discrepancy creates a linked correction case. The historical completion record is preserved. Failures lead back to step 9 for responsibility and step 7 for the failure sequence.
Apply to your project
Which two counterexample tests will you run first in your own end-to-end implementation?
Start your own design
Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.
Download design template (.md)Compare the ten tasks with the example case
Purpose and boundary
Which evidence for a collection route would originate outside the application in your own project?
In the example: Emptying and handover have separate records. A fictional municipal collection service for non-hazardous waste, with its own operational records and confirmed handover.
Requirements
Which rule of your project remains binding even with slow processing?
In the example: Planned mass and actual accepted mass remain separate. The illustrative load limit is 10000 kg; additional planned loading is allowed only if total mass remains ≤ 10000 kg.
Scale estimates
Which individual object concentrates more load than the daily average suggests in the collection and handover workflow?
In the example: Reconnection determines peak processing load. An average of 1.66667 events/s says little about 1000 offline reports from one vehicle after reconnection.
Interfaces
Which input fields make two change intentions different in your project?
In the example: A device event identifies its route and bin. The route, bin, device event, action time and reported mass must remain identical on replay.
Data and states
Which states must remain protected in your model against late replay?
In the example: Each route-and-bin work order records one effective emptying. After abgeschlossen, replay increases neither the count nor the mass. New conflicting evidence opens a linked correction case and leaves the completion record unchanged.
Overall architecture
Which planned service boundary would distribute a currently local guarantee across the network?
In the example: Synchronisation is separate from finalising the evidence. Route assignments, bin-emptying events and handover records must express the same valid state.
Critical flow
What feedback could be missing even though the underlying action has already taken place?
In the example: Acknowledgement follows durable acceptance of the emptying record. Each confirmed emptying takes effect once for the same bin and route work order; route completion requires documented handover status and resolved discrepancies.
Bottlenecks and trade-offs
Which similar display could have two different causes in your project?
In the example: Mass discrepancies and coverage gaps require different checks. A large synchronisation backlog may indicate a coverage gap or server load. Mass discrepancies concern weighing and allocation records. These causes receive separate investigation lists.
Operations and security
Which open state in your project needs a domain specialist as well as technical operations?
In the example: Completion requires an accountable chain of evidence. After abgeschlossen, replay increases neither the count nor the mass. New conflicting evidence opens a linked correction case and leaves the completion record unchanged.
Final design
Which two counterexample tests will you run first in your own end-to-end implementation?
In the example: Test duplicate reports and a different accepted mass end to end. Two devices report the same route-and-bin work order: in either order, exactly one emptying is accepted; conflicting content creates an investigation case instead of a second emptying.