WEBVTT

00:00:00.267 --> 00:00:01.367
One seat left.

00:00:01.367 --> 00:00:02.100
Two travelers.

00:00:02.100 --> 00:00:04.300
Where should the business rule live?

00:00:05.767 --> 00:00:09.800
Keep capacity and confirmed seats inside one inventory aggregate.

00:00:09.800 --> 00:00:12.533
This consistency boundary makes the decision.

00:00:13.967 --> 00:00:15.500
Its invariant is simple.

00:00:15.500 --> 00:00:17.833
Confirmed seats must never exceed capacity.

00:00:17.833 --> 00:00:20.200
Here, one is less than two.

00:00:21.633 --> 00:00:23.067
Request one more seat.

00:00:23.067 --> 00:00:25.967
One plus one is two, so it fits.

00:00:25.967 --> 00:00:29.267
Reserve the seat, then record the fact: Seat Reserved.

00:00:30.700 --> 00:00:32.633
Start again with one confirmed seat.

00:00:32.633 --> 00:00:34.900
A request for two would make three.

00:00:34.900 --> 00:00:37.833
Refuse it, and keep the confirmed count at one.

00:00:39.267 --> 00:00:41.767
Now two travelers ask at once.

00:00:41.767 --> 00:00:44.267
Which boundary must coordinate their requests?

00:00:44.267 --> 00:00:45.533
Pause and predict.

00:00:46.967 --> 00:00:48.200
The inventory aggregate.

00:00:48.200 --> 00:00:50.267
The model names the rule.

00:00:50.267 --> 00:00:54.067
The real implementation still needs atomic enforcement and tests.
