Wednesday, July 28, 2010

Starbucks Does Not Use Two-Phase Commit - Enterprise Integration Patterns

Starbucks Does Not Use Two-Phase Commit - Enterprise Integration Patterns: "While waiting for my 'Hotto Cocoa' I started to think about how Starbucks processes drink orders. Starbucks, like most other businesses is primarily interested in maximizing throughput of orders. More orders equals more revenue. As a result they use asynchronous processing. When you place your order the cashier marks a coffee cup with your order and places it into the queue. The queue is quite literally a queue of coffee cups lined up on top of the espresso machine. This queue decouples cashier and barista and allows the cashier to keep taking orders even if the barista is backed up for a moment. It allows them to deploy multiple baristas in a Competing Consumer scenario if the store gets busy."