5 ms·
Starbucks Does Not Use Two-Phase Commit (2004)
- akent 13y agoProbably worth a (2004) tag.
- gejjaxxita 13y agoDone. Cheers!
- mhb 13y agoAnd the links to the preceding discussions: https://www.hnsearch.com/search#request/all&q=starbucks+two+phase+commit&start=0 https://www.hnsearch.com/search#request/all&q=starbucks+two+...
- pixelcort 13y agoOne thing the article doesn't point out is that, in Japan, coffee shops don't usually take your name during your order. 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.
- ska 13y agoThe article does mention this, at the end of the correlation paragraph.
- esolyt 13y ago> In the US, most Starbucks use an explicit correlation identifier by writing your name on the cup and calling it out when the drink is complete. In other countries, you have to correlate by the type of drink.
- officemonkey 13y agoIn my Starbucks, they keep the drinks in a FIFO stack. My drink might be done, but they wait until the other drinks in the queue are delivered before they call mine. This is okay most of the time, but it is annoying when the person in front of me has a large drink order and I can see my drink ready.
- re_todd 13y agoThat sounds like my Starbucks. I was sitting at a table and overheard a customer complaining that they got their coffee after someone that ordered after them. After the customer left, I heard the Starbucks manager explain to the new hire that the "queue" is very important. It thought "wow, this sounds like my old Data Structures class!"
- AYBABTME 13y agoLIFO is a stack, FIFO is a queue =)
- jloughry 13y agoThis topic was explored further in a recent article [1]. http://www.phdcomics.com/comics/archive.php?comicid=1618 http://www.phdcomics.com/comics/archive.php?comicid=1618 [1] Cham, J. G., Slackenerny, M. A. and Smith, B. S. Coffee Security: A need-based analysis for infering bio-related buzz-concepts. Intl. J. Temporal Deflective Behavior 4(1618), pp. 396, 2013.
- yodasan 13y agoOne 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'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's first come, first serve).
- holyjaw 13y agoIn practice, most people hear "Mike, your Grande Triple-Shot Vanilla Latte is ready!" and immediately someone picks up the drink, studies it, and asks "Is the a Caramel Frappuccino for Dan? I don't see the Whipped Cream!" I don't know what the programming equivalent is.
- mgkimsal 13y agoBeing a Mike, this is why I use the name Titus in many situations. Rarely will there be a name collision. I enjoy seeing the receipts with my name spelled as "Tidas" as well. What's even stranger is when I hand my debit card over, my name as "Michael" is right there, but they don't even question it.
- deleted 13y ago[deleted]
- simonebrunozzi 13y agoThe reason why they call your name is because Schultz, inspired by the "bar" in Milan in the early 1980's, wanted people to believe they had a barista friend. Note that "bar" in Italy has roughly the same meaning as "cafe" in the US. In Italy, then and now, most bars have regular customers, and they get to know each other's name. When I moved to Singapore a few years ago, I started drinking my coffee at a local "Segafredo", and had to teach to the baristas to call me by name whenever I entered. For a few months, they would say "Buongiorno Mr. Simone" 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 "Buongiorno Mr. Giovanni", 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.
- picardo 13y agoNice story, but my Starbucks barista often gets my name wrong. If being friendly was their intention, rather than matching orders and drinks, they certainly haven't gotten the memo.
- jlees 13y agoWhat's the error rate, though? For those of us who either find it awkward or just plain incorrect, how many Emily and Johns are there feeling happy that they had a touch of "personal" service? With an accent, and a short name, giving my name is the part of ordering at Starbucks that I dislike the most, though (presumably due to iterating on the delivery on my part) the retries have become fewer of late. It's especially weird since I pay with the mobile app. No reason my name couldn't be on-screen there for me to point to; some of the smoothest ordering experiences have been while wearing a conference badge, and the cashier wrote my name without asking. On the other hand, I don't hang out at a specific Starbucks location daily, but I have seen folks who apparently do, and who the staff genuinely do know by name. When my local coffee shop (Red Rock) took my drink order without asking my name I definitely felt pretty special. Of course, none of this ruins the twinge of embarrassment (is it embarrassment? I'm not sure) I feel whenever a barista loudly yells "LATTE FOR JEN" over the din of an espresso machine.
- 13y ago
- martingordon 13y agoI 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't recall if they actually called my name out, but perhaps things have changed since 2004 or they treat tourists differently.
- abalone 13y agoFun article, but the title is a little misleading. It's not that Starbucks doesn't use 2-phase commit. It'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. 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't match). What'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. So the issue here is not "atomic or nonatomic", it's "how do I break a business process down into a set of atomic transactions". Very few businesses are going to run their entire supplier-to-customer process inside of a single atomic transaction.
- llcoolv 13y agoThe article is actually on mapping Messaging, Conversation Pattern and Asynchronous Processing to a real world example. Everybody keeps talking about coffee :)
- liquidcool 13y agoIn the Philippines, they ask for your name, but also ask for the receipt when you pick up your drink. I assume that's primarily for theft prevention. But it was wonderful to have everyone get your name right on the first try (it's Philip).
- coffeedan 13y agoIf I have no choice but to get my coffee at a Starbucks, I will always order a "brewed coffee". The order is filled by the order-taker and therefore not subject to any of this barrista bullshit..