Hacker News new | ask | show | jobs
by hinkley 2245 days ago
A classic:

Starbucks does not use two-phase commit

https://www.enterpriseintegrationpatterns.com/ramblings/18_s...

2 comments

Hmm there are some reasons this isn't directly applicable. This mode of behavior is possible due to relying on payment processors ability to reliably transfer money, and the business's ability to verify that potential. I don't think Starbucks would with if they accepted hand written IOUs.

If you can't rely on an actors intent to such a degree, your actions need to also be less costly to be efficient.

Correlated Ids and idempotent end points with retry is pretty much a two phase commit. Something eventually checks and deals with exceptions.

Accounting for loss and developing ways to operate with it make a process viable.

thanks for sharing this, good read