- Build and deployment
- ~5 days
- Simultaneous processes in the stock test
- 8
The challenge
At an in-person sales event, every customer who signs a purchase order spins a prize wheel. Several sales reps work at once, each with their own tablet, and the prizes have limited stock. The wheel cannot award a prize that has already run out or leave the outcome up to the device. The system had to be ready in a matter of days.
What we built
Each sales rep logs the customer's purchase order on a tablet, and the customer spins the wheel. The prize is decided by the server alone, with a secure random generator that weights each prize by the stock remaining.
Stock cannot be oversold, and we verified it with 8 simultaneous processes. Every spin is idempotent, so a retry caused by a network failure does not award two prizes. If a prize runs out, the system assigns a backup one. Emails are sent with retries.
The wheel has a visual theme for each brand. The admin panel includes reports and Excel export, and the event staff received an operations manual. The system was built and deployed in about 5 days, on a very small infrastructure.