Serverlesspresso
A point of sale with no servers to run
Serverlesspresso takes orders at a pop-up coffee bar. Customers scan a code, order on their phone and watch their drink move from queue to pickup. Baristas run the queue from a tablet. A screen by the counter shows what's ready.
Every part of it is a managed AWS service. It scales up for the morning rush, goes quiet when the bar closes, and there's no server to patch.
Each opens in its own window. Scan the code on the display with your phone to place an order.
Serverlesspresso
Order 42: cappuccino, extra shot
- 1Scan the codeEventBridge Scheduler
A new QR code every minute, from a Lambda function
- 2Claim a slotDynamoDB
Ten slots per code; a one-off schedule frees an unused one
- 3Choose a drinkLambda web function
The Nuxt app runs as one web function and reserves the stock
- 4Order savedDynamoDB Streams
An EventBridge Pipe turns the new row into an OrderSubmitted event
- 5Workflow startsLambda durable function
One execution per order, waiting between barista moves
- 6Barista moves itLambda callbacks
Each tap on the board resumes the waiting workflow
- 7Phone updatesAppSync Events
Every status change is pushed, no polling
- 8Play while you waitLambda MicroVMs
Bean Brawl rooms each run in their own MicroVM
- 9Picked upEventBridge
The finished order goes on the bus and is counted
What runs where
Each service does one job and scales with its own traffic.
Runs code
- Lambda web functions
- Run the Nuxt app: pages and API routes in one web function
- Lambda durable functions
- The order workflow: a small state machine that survives waits of any length
- Lambda functions
- Rotate the QR code, free unused slots, count finished orders
- Lambda MicroVMs
- Game rooms with a real WebSocket server, one isolated MicroVM per room
Keeps state
- Amazon DynamoDB
- Menu and stock, orders, QR slots and game scores, with conditional writes so stock never oversells
Moves events
- EventBridge Pipes and event bus
- Start a workflow for every saved order and fan out finished ones
- EventBridge Scheduler
- Every-minute QR rotation and one-off slot expiry
- AppSync Events
- Push order, menu and QR updates to phones, the display and the barista board
The order is the workflow
Each order runs as its own durable execution. It waits for the barista as long as it takes, then releases the stock if the order is declined or cancelled.
A rush can't swamp the bar
The QR code on the display allows ten orders a minute. You have to be at the counter to scan it, and slots nobody uses come back on their own.
Nothing polls
Phones, the display and the barista board stay open to AppSync Events and redraw the moment something changes.