Critical flow
Exhausting the search budget does not prove that no route exists. Which conditions ensure a valid result?
The search can stop before full exploration.
Starting point The import process and search worker write and read versioned artifacts respectively.
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.
Activation during search
Activation during search
Q-41 binds Generation 7, while Import Activates Generation 8.
Result: No mixed generation.
The bound snapshot remains stable throughout the search.
Commit, response loss and resumption
- Pin a snapshot
- Q-41 reads the active generation and its matching real-time snapshot at the start; every journey leg uses this combination.
- Update in parallel
- An import activates a new generation while Q-41 is running. Q-41 completes on its original consistent snapshot; a new request uses the new one.
- Time budget exhausted
- Partial results may contain only fully validated routes; discard any transfer chain that is only partly checked.
Exhausting the search budget does not prove that no route exists.
Partial results contain only fully validated candidates.
The search can stop before full exploration.
Without a fully validated candidate, return a timeout; routes may still exist. With two validated candidates, return exactly those routes as a visibly incomplete partial result.
- Alternative considered
- Reporting no route after a timeout claims more than the search established.
- Trade-off
- Response types become more complex for users.
- Reassess
- Observed search cutoffs justify optimising the search.
Try it yourself
Determine the response at 800 ms with no complete candidate and with two validated candidates.
A hint for your attempt
The search can stop before full exploration.
Compare with a possible solution
- Without a candidate
- Timeout; routes may still exist.
- With candidates
- A partial result containing exactly the two validated routes, clearly marked as incomplete.
Apply to your project
How does this principle apply in your own project: Exhausting the search budget does not prove that no route exists.