TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Starbucks Does Not Use Two-Phase Commit (2004)

119 pointsby gejjaxxitaalmost 12 years ago

9 comments

simonebrunozzialmost 12 years ago
The reason why they call your name is because Schultz, inspired by the &quot;bar&quot; in Milan in the early 1980&#x27;s, wanted people to believe they had a barista friend. Note that &quot;bar&quot; in Italy has roughly the same meaning as &quot;cafe&quot; in the US. In Italy, then and now, most bars have regular customers, and they get to know each other&#x27;s name.<p>When I moved to Singapore a few years ago, I started drinking my coffee at a local &quot;Segafredo&quot;, and had to teach to the baristas to call me by name whenever I entered. For a few months, they would say &quot;Buongiorno Mr. Simone&quot; to me only. I also had to teach them how to do a proper espresso. They were clueless. (I was a barista in my twenties). One day I hear &quot;Buongiorno Mr. Giovanni&quot;, and I immediately knew it was another Italian. He also did the same, had to teach them to call him by name, and how to do a proper espresso. Funny.
评论 #6229943 未加载
评论 #6229483 未加载
评论 #6229527 未加载
abalonealmost 12 years ago
Fun article, but the title is a little misleading. It&#x27;s not that Starbucks doesn&#x27;t use 2-phase commit. It&#x27;s that they break their sales process into a couple of atomic transactions that run in parallel: payment and delivery. Each of those steps still in fact uses 2-phase commit.<p>Running a credit card or accepting cash is 2-phase commit. Drink pickup could be seen as a 2-phase commit (put drink on counter, confirm name, take back if name doesn&#x27;t match). What&#x27;s interesting is the exception handling logic between these parallel transactions. I.e. if payment fails while drink is getting made, try to cancel the drink delivery.<p>So the issue here is not &quot;atomic or nonatomic&quot;, it&#x27;s &quot;how do I break a business process down into a set of atomic transactions&quot;. Very few businesses are going to run their entire supplier-to-customer process inside of a single atomic transaction.
yodasanalmost 12 years ago
One additional concept that Starbucks handles is name collisions. If there are two Mikes, the person then must check the type of drink in order to differentiate his order from the other Mike&#x27;s order. If they happen to be the same, it goes to the first person who ordered (or if one Mike is not aware of the other Mike, it&#x27;s first come, first serve).
评论 #6229441 未加载
评论 #6229955 未加载
akentalmost 12 years ago
Probably worth a (2004) tag.
评论 #6229816 未加载
评论 #6229118 未加载
martingordonalmost 12 years ago
I was in Japan last March and one of the souvenirs I brought back was a Starbucks cup holder with my name written on it in Japanese. Granted, it was at a rest stop Starbucks, and I don&#x27;t recall if they actually called my name out, but perhaps things have changed since 2004 or they treat tourists differently.
coffeedanalmost 12 years ago
If I have no choice but to get my coffee at a Starbucks, I will always order a &quot;brewed coffee&quot;. The order is filled by the order-taker and therefore not subject to any of this barrista bullshit..
pixelcortalmost 12 years ago
One thing the article doesn&#x27;t point out is that, in Japan, coffee shops don&#x27;t usually take your name during your order.<p>This means that the customer must listen for the name of their drink instead of their name. Also, when two people order the exact same drink, it can be ambiguous who gets the first served drink.
评论 #6229206 未加载
评论 #6229197 未加载
liquidcoolalmost 12 years ago
In the Philippines, they ask for your name, but also ask for the receipt when you pick up your drink. I assume that&#x27;s primarily for theft prevention. But it was wonderful to have everyone get your name right on the first try (it&#x27;s Philip).
llcoolvalmost 12 years ago
The article is actually on mapping Messaging, Conversation Pattern and Asynchronous Processing to a real world example. Everybody keeps talking about coffee :)