Final design
Does the design preserve the guarantees of AL-17 when failures occur?
The design connects D-17, M-17, W-17 and AL-17 through a traceable path. Storage forms and process boundaries follow from access patterns, load and consistency requirements; the design remains independent of specific products.
Starting point Step 9 has linked signals, responsibilities and restoration as an operational plan.
Assumptions for the example case
Example design with 10,000 temperature devices, one value every 10 seconds. An example of a time period ranges from 12:00 to immediately before 12:01. The evaluation will be completed at 12:03 at the earliest. The waiting time of 120 seconds after the end of the time period is an evaluation rule and not a permitted deviation of the instrument clock. Numbers and temperatures are illustrative design assumptions.
Decisions, tests and feedback loops along the design path
Runtime view · Durable ingestion, replayable projection and separate display
System boundary · Sensor monitoring
- Decision: Acknowledge only after committing the raw log.
- Test: Duplicate, delayed value and restart do not produce a second effect.
- Reversal: For backlogs, revisit step 3; for rule violations, step 2.
- Gateway, Team, Notification
- Ingestion and projector
- Raw log, time series and result store
Ingestion acknowledges after persisting the raw log. The projector can resume from its checkpoint and updates windows and alerts idempotently.
The design at a glance
| Decision | Justification | Still to be examined |
|---|---|---|
| Durable acceptance before confirmation | Repetition and crash do not lose a confirmed raw value. | Crash before/after commit, duplicate and payload conflict. |
| 60 s window + 120 s processing waiting time | Makes provisional and final states explainable in this example. | Timer, late marking and comparison with Watermark strategy. |
| Final alert at > 30 °C and ≥ 4 values | Minimum scope and rule version make AL-17 testable. | Limit, scope, acknowledged and resolved. |
| Raw log plus time-range queries | Replay and clarification remain possible; team queries remain targeted. | Retention, real query load, backup and recovery. |
Durable acceptance before confirmation
- Justification
- Repetition and crash do not lose a confirmed raw value.
- Still to be examined
- Crash before/after commit, duplicate and payload conflict.
60 s window + 120 s processing waiting time
- Justification
- Makes provisional and final states explainable in this example.
- Still to be examined
- Timer, late marking and comparison with Watermark strategy.
Final alert at > 30 °C and ≥ 4 values
- Justification
- Minimum scope and rule version make AL-17 testable.
- Still to be examined
- Limit, scope, acknowledged and resolved.
Raw log plus time-range queries
- Justification
- Replay and clarification remain possible; team queries remain targeted.
- Still to be examined
- Retention, real query load, backup and recovery.
First vertical demonstration
- Normal flow
- Four valid values finalize W-17; mean 30.5 °C opens AL-17 with TEMP-3.
- Duplicate and conflict
- Same key and same payload remain unique; different payload goes into quarantine.
- Time deviation
- Late remains visible without silent mutation. future-clock remains outside the window.
- Recovery
- The projector resumes from its checkpoint and creates no duplicate final result or alert.
Open decisions before deployment
In the example, 120 seconds are considered to be the evaluation rule.
They explain when W-17 will be final.
- Trade-off
- A longer wait improves completeness and increases delay; a shorter wait increases the share of late values.
- Reassess
- After measurement of real delivery and device time profiles.
Define retention together with purpose, access roles and investigation requirements.
17.28 GB/day is only a technical quantity assumption.
- Trade-off
- Longer retention improves analysis and increases protection and cost requirements.
- Reassess
- Before deployment with responsible persons and protection requirements.
Terms in this step
- Watermark comparison
- Watermarks describe event-time progress based on the data stream. This case's simple timer finalises using processing time. Both explicitly handle delays but use different progress models.
Try it yourself
Review five parts of the design: acceptance, time rule, alert, late/future-clock and restart. State a decision, test and earlier step to revisit for each.
A hint for your attempt
Each part needs an expected result. A failed test identifies the step whose assumption needs review.
Compare with a possible solution
- Acceptance
- Decision: commit before acknowledgement. Test: crash before/after commit and duplicate delivery. Revisit: steps 4 and 5 for lost or duplicate acceptance. Expected: one durable M-17, no acknowledged data loss, conflicts in quarantine.
- Time rule
- Decision: W-17 becomes final after window end + 120 s. Test: timer and late value. Revisit: step 2 if finality is unclear. Expected: provisional before the deadline, then a stable final state; values projected too late remain late.
- Alert
- Decision: > 30 °C and ≥ 4 values with TEMP-3. Test: 30 °C, three values, 30.5 °C with four values. Revisit: steps 2 and 5. Expected: only the four distinct final values with 30.5 °C open AL-17; acknowledgement and data gaps do not resolve it.
- Time constraints
- Decision: future-clock in quarantine, late in the raw log. Test: ingest both messages. Revisit: steps 4 and 9. Expected: future-clock has no window effect; the late raw measurement remains visible with W-17 unchanged.
- Recovery
- Decision: checkpoint plus idempotent result update. Test: restart the projector after commit. Revisit: steps 6 and 7. Expected: one final result, one AL-17 and a consistent checkpoint.
Apply to your project
Which five pieces of evidence must your event-processing design provide before deployment?
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
What effect should your measurement system demonstrate, and which human action remains outside its scope?
In the example: Sensor monitoring provides explainable measurement states. The building team evaluates their significance and appropriate actions for each building.
Requirements
Which rule in your system needs a minimum data count, timing and a threshold together?
In the example: AL-17 is created only from a final W-17 with at least four valid measurements and an average above 30 °C.
Scale estimates
Which query shape and retention period determine storage for your events?
In the example: 17.28 GB/day of normalised raw data justify retention and the time-range model. Replay peaks require a separate test profile.
Interfaces
Where does your contract distinguish acceptance, processing and visible outcome?
In the example: An ingestion acknowledgement means the raw measurement is durably stored. It does not mean W-17 is final or AL-17 is open.
Data and states
Which data is authoritative in your system, which is derived and which merely records workflow status?
In the example: The raw event is the traceable input. Windows and alerts are derived results with explicit versions.
Overall architecture
Which process boundary separates acceptance from replayable domain effects in your design?
In the example: Ingestion acknowledges durably accepted data. The projector may process it again after a checkpoint and advances the derived state idempotently.
Critical flow
What is the first irreversible business effect in your critical process?
In the example: Commit the raw log before acknowledging transport. Finalise the window before creating the alert. After restart, recognise existing effects rather than duplicating them.
Bottlenecks and trade-offs
What additional measurement in your system separates a suspected cause from a mere symptom?
In the example: Choose a queue, cache or additional distribution from a measured symptom and its cause, not from a product mentioned by a source.
Operations and security
Which role can resolve a state in your organisation, and what evidence remains?
In the example: Every abnormal state has a signal, responsible role and traceable resolution. Open data gaps and alerts remain visible.
Final design
Which five pieces of evidence must your event-processing design provide before deployment?
In the example: The first end-to-end flow is: authenticate → accept durably → project replayably → finalise → explain the alert → review manually. The template records decisions and evidence for the reader's own case.