The overall architecture
How are responsibility for train service status and external processing divided between modules and processes?
Local consistency determines the train service status API boundary. Feed processing runs separately for deferred work. Train service matching, version validation, status projection and report approval are modules inside the API. Two inputs meet there: the timetable service supplies scheduled services; dispatch confirms cancellations and corrections. Feed processing durably accepts and matches source reports. A relational status store holds the version and cancellation decision. A separate rebuildable display serves passengers and the passenger information team. Flows: timetable service → feed processing → status store; dispatch → train service status API → status store; status store → display projection → passenger interface. There is no train-control path.
Starting point Cancellation history retains the reason for each correction.
Assumptions for the example case
Original fictional design: a regional rail line with dated services, stops and manually confirmed cancellations. An actual-status report is current at age < 90 seconds; at 90 seconds its timestamp is marked stale. All figures and test targets are illustrative assumptions.
Runtime components and datastores
Runtime topology · processes, data stores and external systems
Train service status system
Timetable, source report, authoritative status and passenger display remain separate; there is no train-control path.
Domain responsibilities within the API
Internal view · Train service status API
Process boundary · Train service status API
Assignment, version decision, projection and authorized correction remain their own responsibilities.
Map responsibilities to runtime components
| Domain task | Runtime | Responsibility |
|---|---|---|
| Train service matching | Train service status API | Links timetable, operator and operating day to one train service. |
| Version validation | Train service status API | Orders actual-status reports by source version and protects confirmed cancellations. |
| Status projection | Train service status API | Creates the current passenger view with a timestamp. |
| Report approval | Train service status API | Records cancellations and authorised corrections with their reasons. |
| Feed processing | Separate background process | Processes stored work and external feedback. |
| Timetable service | External boundary | Provides or confirms the evidence agreed for this case. |
Train service matching
- Runtime
- Train service status API
- Responsibility
- Links timetable, operator and operating day to one train service.
Version validation
- Runtime
- Train service status API
- Responsibility
- Orders actual-status reports by source version and protects confirmed cancellations.
Status projection
- Runtime
- Train service status API
- Responsibility
- Creates the current passenger view with a timestamp.
Report approval
- Runtime
- Train service status API
- Responsibility
- Records cancellations and authorised corrections with their reasons.
Feed processing
- Runtime
- Separate background process
- Responsibility
- Processes stored work and external feedback.
Timetable service
- Runtime
- External boundary
- Responsibility
- Provides or confirms the evidence agreed for this case.
Train service status and the display projection run separately
Train service status and the display projection run separately.
A confirmed cancellation for the same train service and operating day remains effective until an explicitly authorised newer correction exists.
Train running states, source reports, and cancellation history must represent the same valid state. Your exercise identifies the input and expected result.
- Alternative considered
- A separate service for each module spreads this guarantee across additional network boundaries: a confirmed cancellation for the same service and operating day remains effective until an explicitly authorised newer correction exists.
- Trade-off
- Common schema changes require coordinated releases.
- Reassess
- A substantially different load for feed processing, or separate ownership, calls for a new division of runtime components.
Try it yourself
Classify train service matching, feed processing and the timetable service as a module, process or external system. Justify the authoritative datastore.
A hint for your attempt
A domain responsibility becomes a process only when it has its own execution unit.
Compare with a possible solution
- Boundaries
- Train service matching is a module in the train service status API; feed processing is a separate process; the timetable service is external.
- Storage
- The datastore for train service status, source reports and cancellation history holds the authoritative evidence. A confirmed cancellation for the same service and operating day remains effective until an explicitly authorised newer correction exists. The shared transaction protects this relationship; external responses remain separate evidence.
Apply to your project
Which planned service boundary would distribute a currently local guarantee across the network?