System Design Atlas

Rail timetables and disruption information

02 / 10Worked example

Requirements

Which business rule protects the train service, and how is the agreed limit tested?

The case boundary defines business rules and measurable targets. For train service F-24, the central invariant is that a confirmed cancellation for the same service and operating day remains effective until an explicitly authorised newer correction exists. An invariant must hold after every completed operation. Quality targets describe measurable operational behaviour.

Starting point The operating day is part of a train service's identity.

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.

Business guarantee and measurable limit

Cancellation survives outdated reports

1
Match train service F-24Operator, operating day and service identifier match
2
Compare Source VersionVersion 9 wins against older version 8
3
Authorize correctionA higher-version delay report alone cannot reverse a cancellation
Freshness indicatorSource age < 90 s: current · At 90 s: stale

A confirmed cancellation remains effective until an explicitly authorised correction.

A confirmed cancellation for the same train service and operating day remains effective until an explicitly authorised newer correction exists.

Business requirements (functional)

Further reading
Durable commitment
A confirmed cancellation for the same train service and operating day remains effective until an explicitly authorised newer correction exists.
Evidence and closure
An older delay report or identical replay leaves the cancellation unchanged.

Operational goals (non-functional)

Further reading
Local processing
Illustrative target: 95% of local commands complete in under 800 milliseconds during a 15-minute profile at 20 commands/s. External processing and human waiting time are measured separately.
Observable limit
An actual-status report is current at age < 90 seconds; at 90 seconds its timestamp is marked stale. The boundary test checks this case rule; operational measurement evidence is still outstanding.

Every forecast includes freshness information

Every forecast includes freshness information

Every forecast includes freshness information.

A confirmed cancellation for the same train service and operating day remains effective until an explicitly authorised newer correction exists.

An actual-status report is current at age < 90 seconds; at 90 seconds its timestamp is marked stale. The exercise specifies the input and expected result.

Alternative considered
A response-time target alone leaves invalid business states unchecked.
Trade-off
Strict validation can pause an operation for investigation.
Reassess
Measured processing times or new contracts with the timetable service require a review of the targets.

Try it yourself

Separate the business invariant from the 800-millisecond target. Explain the exact limit in this case.

A hint for your attempt

Completing an operation quickly but incorrectly does not satisfy the business guarantee.

Compare with a possible solution
Business rule
A confirmed cancellation for the same train service and operating day remains effective until an explicitly authorised newer correction exists. The counterexample test checks that the resulting state is allowed.
Operations and boundary
The 800-millisecond target applies to 95% of local commands in the assumed peak profile. An actual-status report is current at age < 90 seconds; at 90 seconds its timestamp is marked stale.

Apply to your project

Which rule of your project remains binding even with slow processing?

Next: test a hotspot on a single train service separately.