System Design Atlas

Rail timetables and disruption information

06 / 10Worked example

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

Timetable serviceScheduled services and source reports

Train service status system

Train service status APIAuthorise cancellation and correction
Relational status storeVersion and cancellation decision
Feed processingDurably accept source reports
Rebuildable display projectionBuilt from the status store
Timetable service → Feed processingScheduled service or actual-status report
Feed processing → Relational status storeMatched source version
Train service status API → Relational status storeAuthorised cancellation or correction
Relational status store → Rebuildable display projectionHighest valid status version

Timetable, source report, authoritative status and passenger display remain separate; there is no train-control path.

Two inputs meet in the train service status API: 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.

Domain responsibilities within the API

Internal view · Train service status API

Process boundary · Train service status API

Train service matchingCombine operator, operating day and service identifier
Version validationEvaluate source version and reception time separately
Status projectionProject the highest valid status into the display
Report approvalAuthorise cancellation and explicit correction
Fahrtzuordnung → Versionsprüfungassigned M-24
Versionsprüfung → MeldungsfreigabeVersion and message type
Meldungsfreigabe → LageprojektionValid status version

Assignment, version decision, projection and authorized correction remain their own responsibilities.

The train service status API contains service matching, version validation, status projection and report approval. Show their domain call relationships; modules have no separate server icons.

Map responsibilities to runtime components

Domain taskRuntimeResponsibility
Train service matchingTrain service status APILinks timetable, operator and operating day to one train service.
Version validationTrain service status APIOrders actual-status reports by source version and protects confirmed cancellations.
Status projectionTrain service status APICreates the current passenger view with a timestamp.
Report approvalTrain service status APIRecords cancellations and authorised corrections with their reasons.
Feed processingSeparate background processProcesses stored work and external feedback.
Timetable serviceExternal boundaryProvides 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

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?

Next: store the cancellation before publishing it.