Comment by keypusher

1 day ago

There are some clear parallels to me here from task scheduling algorithms, which I suppose businesses have been reinventing and tweaking for many years. For instance, emergency rooms often use something like priority scheduling, where high priority tasks get scheduled first, but can classically lead to starvation of low-priority tasks such as sitting in the waiting room for a long time with a minor injury. Starbucks wants to maximize throughput while minimizing wait time, but up until now they were just placing all orders into the same FIFO queue and popping them off one at a time? With occasional Shortest-Job-First exceptions (ex. just a black coffee). That seems fairly naive. Something that feels like a slight improvement to me would be having 2 queues (in-person and online, no reason to separate walk-up and drive-through), and alternate popping off from each of them. Or a priority queue? Maybe there is more you could do to maximize throughput, such as batching together food that needs to be heated, or surfacing to the barista how many pending shots need to be pulled for the entire queue so they can just crank out espresso during busy times. Curious if anyone with more experience in the domain has better ideas.