Compensation (draft)
Last updated on 2013-03-13 19:27 UTC
back to stuff
Some random thoughts on what I've learned about compensation as an alternative to transactions.
- Compensation means to rollback the effect of a transaction (in the broadest sense of the term)
with another transaction that has the opposite effects
- When thinking about compensation, I've always stopped at "What do I do if the compensation action fails?" --
it seemed to me a big problem I cannot handle (how can I do something that does not fail?)
- from these
articles from The Register I gain a fundamental
insight: if the compensation operation fails, the only alternative is to let it handle to a human operator
- This can handle extended outages of a service (think of one of AWS or Azure)
- Under the hypothesis that if a system is unavailable the others are available (not always true,
see these
episodes from Azure)
- In my opinion, it is also fine to retry the compensation operation for some time and at last
give up and ask for human intervention
back to stuff