DistributedSagas
DistributedSagas copied to clipboard
Clarifying the Flight case
Really great talk on JOTB17, and there was this question on the flight case and idempotency VS commutativity but the explanation wasn't very clear. I think that we need a little diagram or example or test that clarifies what happens in this case. e.g.
| Flight Went Through | Flight Didn't go Through |
----------------------------------------------------|
I do commit & do cancel | have two bookings, one | Will have an extra add |
| cancel, if the first | and remove but yes - the |
| booking goes after the | system is hapilly |
| 1st cancel, there's no | correct so +1 |
| reason to not go | |
| through thus ending | |
| in a booked state. The | |
| only solution here, | |
| would be to have | |
| monotonic IDs for | |
| the booking orders | |
| which means | |
| serialization. This | |
| then should be a | |
| necessary and | |
| explicit requirement | |
| because that system | |
| can't be CA and would | |
| add significant | |
| latency and be a | |
| single point of at | |
| least partial failure. | |