System Design Atlas

Multimodal journey planning

08 / 10Worked example

Bottlenecks and trade-offs

Search expansions explain slow queries. Which conditions ensure a valid result?

Many transfers enlarge the search space.

Starting point Partial results contain only fully validated candidates.

Assumptions for the example case

A fictional journey planner for buses, trains and walking routes in one region. Each response binds a timetable version and a real-time snapshot. The scope ends with journey information, without a booking commitment. All quantities, thresholds and operational objectives are illustrative assumptions.

Confine search space

Confine search space

Many expansions800 ms budget
Slow data accessFew expansions
Number of candidatesComplete/Open
Limit search spaceData maintainers
Graph and cache timep95 per generation
Check the snapshot cachePlatform operations
Viele Expansionen → KandidatenzahlMeasure
Kandidatenzahl → Suchraum begrenzenExamining Heuristics
Langsamer Datenzugriff → Graph- und CachezeitMeasure
Graph- und Cachezeit → Snapshotcache prüfenAccess path

Expansions and data access have various measurements and measures.

Latency → search expansions or data access. Each cause needs a targeted response; adding workers alone does not address both.

From symptom to targeted action

SignalValidationAction and limit
Lots of slow searchesMeasure expansion count by origin region and number of transfersLimit search budget and explicitly mark partial results.
Many seemingly secure connectionsCheck timestamps and footpath assumptionsShow data age and justify the transfer buffer.

Lots of slow searches

Validation
Measure expansion count by origin region and number of transfers
Action and limit
Limit search budget and explicitly mark partial results.

Many seemingly secure connections

Validation
Check timestamps and footpath assumptions
Action and limit
Show data age and justify the transfer buffer.

Search expansions explain slow queries.

Search expansions explain slow queries.

Measure expansion count and data access time separately.

Many transfers enlarge the search space.

Check the transfer budget while retaining partial-result status. Check graph layout and local data storage while preserving the domain filters.

Alternative considered
Adding workers does not shorten an individual search with poorly defined limits.
Trade-off
Limitation can cut off alternatives.
Reassess
Frequent partial responses require algorithm checking.

Try it yourself

Choose one action for excessive search expansions and another for slow graph access.

A hint for your attempt

Many transfers enlarge the search space.

Compare with a possible solution
Search space
Check the transfer budget while retaining partial-result status.
Data access
Check graph layout and local data storage while preserving the domain filters.

Apply to your project

How does this principle apply in your own project: Search expansions explain slow queries.

Step 9: Data age remains visible. Which conditions ensure a valid result?