Skip to Content
The Software Architect Elevator
book

The Software Architect Elevator

by Gregor Hohpe
April 2020
Intermediate to advanced
365 pages
8h 50m
English
O'Reilly Media, Inc.
Book available
Content preview from The Software Architect Elevator

Chapter 17. Your Coffee Shop Doesn’t Use Two-Phase Commit

Learn About Distributed System Design While in the Queue!

Grande, durable, non-atomic, soy chai latte
Grande, durable, nonatomic, soy chai latte

When designing solutions, architects often look at technical solutions like ACID (Atomic, Consistent, Isolated, Durable) transactions and binary values in order to craft a well-defined and perfect system. In reality, though, designing complex systems isn’t that easy, so there’s one more source of design guidance that you should consider: the real world.1

Hotto Cocoa o Kudasai

You know you’re a geek when going to the coffee shop gets you thinking about interaction patterns between loosely coupled systems. This happened to me on a trip to Japan. Some of the more familiar sights in Tokyo are the numerous Starbucks coffee shops, especially in the areas of Shinjuku and Roppongi. After stretching my limited Japanese skills by muttering “Hotto Cocoa o Kudasai” (“A hot chocolate, please”), I returned to my bubble of foreigner-ness and started thinking about how Starbucks processes drink orders.

Starbucks, like most other businesses, is primarily interested in maximizing throughput of orders because more orders equal more revenue. Interestingly, the optimization for throughput results in a concurrent and asynchronous processing model: when you place your order, the cashier marks a coffee cup with the details of your order (e.g., ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Software Architect Elevator

The Software Architect Elevator

Gregor Hohpe
AI Engineering

AI Engineering

Chip Huyen
AI Engineering

AI Engineering

Chip Huyen

Publisher Resources

ISBN: 9781492077534Errata Page