Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. OpenJev(openjev.com ↗)
    15comments
  2. Jemalloc 5.4.0(github.com/jemalloc ↗)
    45comments
  3. The scourge of x86 emulation(fex-emu.com ↗)
    27comments
  4. Astra for Law(openai.com ↗)
    578comments
  5. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    135comments
  6. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    222comments
  7. Qwen 3.8 Omni Flash(qwen.ai ↗)
    82comments
  8. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    170comments
  9. Replacing Pull Requests with Delta(zed.dev ↗)
    4comments
  10. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    38comments
  11. Wax motor(wikipedia.org ↗)
    70comments
  12. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    234comments
  13. When the fractional part of a float fixes your shader(crocidb.com ↗)
    1comments
  14. Microsoft exec called AI scraping 'the largest theft of labor in human history'(techcrunch.com ↗)
    12comments
  15. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    155comments
  16. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)(byteshape.com ↗)
    11comments
  17. How to Write with an LLM(sockpuppet.org ↗)
    104comments
  18. Ask A Monk – A digital wilderness for thoughts with no immediate answer(askamonk.online ↗)
    24comments
  19. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    59comments
  20. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    27comments
  21. Why Does the Universe Expand?(cosmicave.org ↗)
    57comments
  22. Speeding up gearhash on ARM64(sam.dev ↗)
    discuss
  23. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    42comments
  24. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    370comments
  25. Apple detectives solved mystery of ancient tree and rewrote the history of fruit(scientificamerican.com ↗)
    12comments
  26. How do we prevent mathemathics from devolving into the Medieval Era of secrecy?(mathoverflow.net ↗)
    108comments
  27. The most important product decision is what you don't build(liamnugent.me ↗)
    39comments
  28. CrowdSec Source Code Leak(crowdsec.net ↗)
    49comments
  29. How Uber Protects Against Retry Storms(uber.com ↗)
    44comments
  30. Show HN: Snapdrop: Instantly share files between devices. No setup, no signup(snapdrop.me ↗)
    37comments

Starbucks Does Not Use Two-Phase Commit (2004)

119 pointsby 13y agoeaipatterns.com
36 comments
13y agoHN ↗

One 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.

13y agoHN ↗

The article does mention this, at the end of the correlation paragraph.

13y agoHN ↗

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.

13y agoHN ↗

In 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.

13y agoHN ↗

That 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!"

13y agoHN ↗

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'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).

13y agoHN ↗

In 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.

13y agoHN ↗

Being 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.

13y agoHN ↗

The 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.

13y agoHN ↗

Nice 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.

13y agoHN ↗

What'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 agoHN ↗

My name is Simone. Try to guess how often my name is pronounced in the wrong way. (hint: it's probably more than 99%). :)

13y agoHN ↗

I give a different name. My problem isn't so much that no one knows how to say mine; it's that no one knows how to spell it, and since someone else reads it, they generally fumble the totally weird series of letters the other barista wrote down. So I started to think of it as less about providing my name -- I don't care about fake familiarity -- and more about providing a uniquish identifier. So I optimize for that: pick a name that everyone knows but few people have. "Art" works pretty well.

13y agoHN ↗

Not Ford Prefect? ;-) (I suppose Art Dent is close enough...)

13y agoHN ↗

I suspect that's because a lot of Brits (and the commonwealth, certainly here in NZ) don't take well to commercial friendships. We don't want a random barista knowing our name.

However, if we've seen the same barista every day for a year it's different. So the Italian situation is fine, but asking up front and pretending is not.

13y agoHN ↗

I make up a different name every time I go into a Starbucks. I could be Marty one day, Siegfried another, and Rupert the next.

13y agoHN ↗

Do they usually know how to spell Siegfried?

13y agoHN ↗

Here's my story, for what it is worth.

I'm an American. I don't normally go into places like Starbucks. I recently went to a "juice bar" and was one of only two customers there. I paid with cash as I always do nowadays because of Visa/MC/etc data-mining. The one and only person behind the counter asked for my name. It really got my hackles up, I involuntarily scowled and I said I pay cash so I won't have to tell you my name. The poor girl said they only ask for names so orders won't get mixed up - which makes sense from a rote point of view, but was ridiculous given that there were only two customers in the entire place.

I guess if I were used to places asking for my name, I would have simply just made one up on the spot and things would have gone smoothly -- although I dislike being 'forced' to lie on a casual basis like that, if I have a choice I simply won't frequent a business that puts me in that position. I haven't been back to that juice bar since, despite it being only a few blocks from my house.

It seems the "marketing types" really don't get me - walmart greeters disturb me, makes me feel bad for them rather than "welcome" by reminding me how much better off I am than the person who has to take such a dreary and unproductive job. Bathroom attendants totally creep me out with pervo vibes rather than make me feel like I'm in a high-class establishment. My gym forces the people at the front-desk to say goodbye when you leave, which makes me feel like I have to choose between being an asshole and ignoring them or being fake and responding to their corporate-enforced fakeness.

I would really like to know what percentages of the population actually likes this stuff versus simply tolerates it or like myself feels put on the spot by it.

13y agoHN ↗

Do you honestly believe that by giving your first name when making an order that data mining will ensue?

13y agoHN ↗

Who knows? Some little mom-and-pop juice-bar, probably not. Megalocorp like Starbucks with millions to spend on such a project, quite possibly.

After all, birth-date + gender + zip-code is enough uniquely identify 87% of the population - what's the chance that I've inadvertently let slip some information in addition to my name? Maybe gender, plus first name plus zip-code of the point-of-purchase is similarly revealing? The thing about privacy is once you've lost control of it, you can never get that control back so staying vigilant is important.

http://www.forbes.com/sites/adamtanner/2013/07/22/how-just-a...

13y agoHN ↗

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't recall if they actually called my name out, but perhaps things have changed since 2004 or they treat tourists differently.

13y agoHN ↗

Fun 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.

13y agoHN ↗

The article is actually on mapping Messaging, Conversation Pattern and Asynchronous Processing to a real world example. Everybody keeps talking about coffee :)

13y agoHN ↗

In 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).

13y agoHN ↗

If 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..