The overall architecture
Which decision must remain explicit outside the ingestion process?
The domain tasks from the overview appear as an ingestion component, raw event log, projector, and time-window data store. This is a runtime view; the component view then separates their internal responsibilities.
Starting point Step 5 separates raw events, windows and alert states.
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.
Locate the gateway, ingestion, raw log, projector and result store
Runtime view · Durable ingestion, replayable projection and separate display
System boundary · Sensor monitoring
- 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.
Dividing the input and projector processes into domain modules
Component view · Collaboration within two processes
Ingestion process
Projector process
- Domain modules
- Joint contracts
- Device and team
The ingestion module creates no alerts. The projector evaluates only durably accepted raw values and protects result updates with a checkpoint and unique keys.
Map domain responsibilities to technical components
| Technical task | Component | Cooperation |
|---|---|---|
| Assign devices | Device authentication | Checks keys and tenants before writing the raw log. |
| Reliably accept value | Ingestion and raw event log | Writes deduplication and raw value before confirmation. |
| Apply time rule | Window projector | Reads from Checkpoint and runs processing timers. |
| Explain alerts | Alert rule and result store | Writes the final result with TEMP-3 and makes it readable. |
| Reading and acknowledging | API in the input process | Checks tenant and building-team permissions; reads the result store and updates acknowledgement atomically. |
| Notification | Notification delivery module in the projector | Reads the durable delivery request; the external service receives AL-17 as a stable reference. |
Assign devices
- Component
- Device authentication
- Cooperation
- Checks keys and tenants before writing the raw log.
Reliably accept value
- Component
- Ingestion and raw event log
- Cooperation
- Writes deduplication and raw value before confirmation.
Apply time rule
- Component
- Window projector
- Cooperation
- Reads from Checkpoint and runs processing timers.
Explain alerts
- Component
- Alert rule and result store
- Cooperation
- Writes the final result with TEMP-3 and makes it readable.
Reading and acknowledging
- Component
- API in the input process
- Cooperation
- Checks tenant and building-team permissions; reads the result store and updates acknowledgement atomically.
Notification
- Component
- Notification delivery module in the projector
- Cooperation
- Reads the durable delivery request; the external service receives AL-17 as a stable reference.
Product neutral start
- A common backend
- Ingestion with the team API and the projector are two explicitly named processes. The raw log and transactional result store are separate logical stores; initially, they may share a database. An append-oriented raw log supports replay; relational transactions protect windows, alerts and checkpoints; time indexes support range queries.
- Later distribution
- Separate scaling or further projections require measured evidence of backlogs, isolation needs or different query patterns.
- Notification and service
- Where needed, the transaction writes a unique alert delivery request to an outbox, a durable list of pending deliveries. The projector sends it to the external notification service and retries with the same reference after an uncertain outcome. Without provider deduplication, the notification may arrive twice; AL-17 remains a unique domain object visible through the API.
Terms in this step
- Checkpoint
- Saved processing progress. It allows restart without blindly repeating the business effect.
- Modular process
- A runtime unit with clear domain components. A module does not automatically require a separate service.
Try it yourself
Assign acceptance, window finalisation and the alert rule to ingestion or the projector. Add a storage test.
A hint for your attempt
Ingestion knows the message; time-based domain evaluation requires replayable raw measurements and the timer.
Compare with a possible solution
- Input
- Authenticates D-17, checks the key and persists raw value plus deduplication. Test: no confirmation before commit; after commit, M-17 is readable.
- Projector
- Forms W-17, waits 120 seconds after the window ends and applies TEMP-3. Test: restarting from a checkpoint does not finalise the window twice.
- Boundary
- The result store separates the raw log from team queries. Test: a history read error must not create a new alert.
Apply to your project
Which process boundary separates acceptance from replayable domain effects in your design?