System Design Atlas

Household services, appointments and proof of completion

06 / 10Worked example

The overall architecture

Notifications follow the domain commit. Which conditions ensure this outcome?

A notification service failure must not lose consent.

Starting point Investigation ends with a documented agreement.

Assumptions for the example case

A fictional placement service for household help in fixed two-hour sessions. Service workers confirm appointments themselves; disputed work remains under review. All quantities, thresholds and operational targets in this design are illustrative assumptions.

Domain records and notifications

Domain records and notifications

Household and worker interfaceTwo roles
Household services APIScope + appointment
Relational datastoreOrder + Consent
Evidence storeReports + Objections
Notification workerCommunications
Notification serviceExternal
Clarification viewMediation team
Household and Service Interface → Service APIAuthenticated Commands
Service API → Relational data storeA-48 + T-48 + approval
Service API → Evidence storeL-48 + objection
Relational data store → Notification workercommitted notification
Notification Worker → Notification ServiceNotification
Dispute view → Service APIAuthorised review

The API and data store own consent; delivery status does not change the domain agreement.

API/data store, report store and worker connected to the external service; a dispute view for the mediation team.

Responsibilities within the application

Modules of the service API

Clarification of needsFixes scope and access instructions
MatchingChecks suitability and availability
Appointment agreementCombines consent from both parties
Work recordRecords work, consent and objections
Bedarfsklärung → PassungscopeHash
Passung → TerminvereinbarungD-48 available
Terminvereinbarung → LeistungsnachweisAgreed appointment

Needs, matching, agreement and work records retain their own responsibilities.

Internal modules: Needs clarification fixes the scope and necessary access instructions. Matching checks suitability and availability. Appointment agreement combines consent from both parties. Work records retain actual work, consent and objections. The overall architecture maps these responsibilities to runtime processes and storage.

Runtime components and authoritative data

Runtime boundary
Household and worker interface → service API → relational data store. Evidence storage retains reports. The notification worker reads committed notifications → external service; delivery status does not change consent. The mediation team uses a separately authorised dispute view.
Module responsibilities
Needs clarification fixes the scope and necessary access instructions. Matching checks suitability and availability. Appointment agreement combines consent from both parties. Work records retain actual work, consent and objections.

Notifications follow the business transaction commit.

Notifications follow the business transaction commit.

The worker sends committed notifications.

A notification service failure must not lose consent.

Owns consent, appointments and the review state. Delivers messages; the report store retains evidence and does not decide consent.

Alternative considered
Sending directly before commit may announce incorrect appointments.
Trade-off
Notification can follow.
Reassess
High delay justifies expansion.

Try it yourself

Assign API, Worker, and Report store.

A hint for your attempt

A notification service failure must not lose consent.

Compare with a possible solution
API
Owns consent, appointments and the review state.
Worker
Delivers messages; the report store retains evidence and does not decide consent.

Apply to your project

How does “Notifications follow the domain commit” apply to your own project?

Step 7: Allocating the worker resolves contention. Which conditions ensure this outcome?