Requirements
What commitment must apply to competing reservations?
From the system boundary, we derive desired functions, immutable rules and measurable quality goals. The API (programming interface) accepts requests and provides their status.
Starting point From step 1: The rental application is responsible for vehicle A, the period 9-12 o'clock and the rental status; external services provide tested results.
Assumptions for the example case
Example design: an operator, specifically assigned vehicles, planned periods and a region. Figures are illustrative design assumptions, not company data.
A reservation in three levels
The same reservation on three levels
Function
What the person can trigger and see.
Invariant
Which rule applies to each change of state.
Quality objective
How the performance is later measurably checked.
The mandatory occupancy check protects this rule even in the case of simultaneously arriving write processes.
Business requirements (functional)
Further reading
| Function or rule | Expected result |
|---|---|
| Finding a vehicle | Show suitable vehicles, price and time period. |
| Reserve and cancel | Secure occupancy bindingly or release in a controlled manner. |
| Take over and return | Checking authorization, arranging access and recording usage times. |
| Settlement | Determine costs from tariff and actual use; assign payment and receipt. |
| Invariant: at most one effective occupancy per vehicle and time window | The database also protects competing write operations. A successful search is not yet a promise. |
| Invariant: Repeat does not create a second order | Booking, payment and vehicle release are each given a stable order identity. |
| Invariant: Access only with valid booking and authorization | The server checks the person, vehicle, time period and current operating state at each release. |
Finding a vehicle
- Expected result
- Show suitable vehicles, price and time period.
Reserve and cancel
- Expected result
- Secure occupancy bindingly or release in a controlled manner.
Take over and return
- Expected result
- Checking authorization, arranging access and recording usage times.
Settlement
- Expected result
- Determine costs from tariff and actual use; assign payment and receipt.
Invariant: at most one effective occupancy per vehicle and time window
- Expected result
- The database also protects competing write operations. A successful search is not yet a promise.
Invariant: Repeat does not create a second order
- Expected result
- Booking, payment and vehicle release are each given a stable order identity.
Invariant: Access only with valid booking and authorization
- Expected result
- The server checks the person, vehicle, time period and current operating state at each release.
Invariants are business rules that must be maintained at each permitted state change. Here they concern occupancy, repetition of orders and vehicle release.
Quality goals and their technical implications (non-functional)
Further reading
| Commitment / Objective | Consequence for the draft |
|---|---|
| SLO: Search: p95 ≤ 1 s in assumed load profile | Measure response time at the API output. Search data may be at most 30 s stale; the reservation performs the authoritative check. |
| SLO: Local hold: p95 ≤ 500 ms | The short database transaction does not contain an external provider call. Payment confirmation shall then run. |
| SLO: Booking API: 99.9% per calendar month | Measure availability separately from domain success and provider responses. A booking conflict is not a failure. |
SLO: Search: p95 ≤ 1 s in assumed load profile
- Consequence for the draft
- Measure response time at the API output. Search data may be at most 30 s stale; the reservation performs the authoritative check.
SLO: Local hold: p95 ≤ 500 ms
- Consequence for the draft
- The short database transaction does not contain an external provider call. Payment confirmation shall then run.
SLO: Booking API: 99.9% per calendar month
- Consequence for the draft
- Measure availability separately from domain success and provider responses. A booking conflict is not a failure.
SLO stands for Service Level Objective: a measurable operating goal with a defined measurement point and evaluation period. p95 means: 95% of the measured requests remain below the target value. The specified SLOs are targets for later load and operational tests.
Restricted performance
- Search remains informative
- A delayed display may lead to a rejected reservation; alternatives are then offered.
- Unclear payment remains visible
- The status remains pending reconciliation. The application does not confirm a booking solely due to a missing error message.
Terms in this step
- Invariant
- A rule that is maintained at every permitted state change – for example, an non-overlapping occupancy.
- SLO
- Service Level Objective: a measurable operational goal, such as the response time of the search or the monthly availability of the booking API.
Try it yourself
Two people reserve vehicle A at the same time for 9-12 o’clock. Formulate a function, an immutable rule, and a measurable goal. How do you check the rule?
A hint for your attempt
The action describes a desire, the rule limits valid results, the goal sets a measured value.
Compare with a possible solution
- Function
- A person can request an available period of time and read the reservation status.
- Invariant and test
- At most one effective occupancy may exist. Send two competing reservations: Exactly one can be successful if the vehicle was previously free.
- Quality objective
- At least 95 % of the searches last a maximum of one second in the assumed load profile. We test this with a load test.
Apply to your project
Transfer the three levels to your own core process and mark which test case shows a domain rejection and which shows a technical failure.