Developer finds distributed systems lessons hidden inside a simple Rock Paper Scissors game
A developer built an online Rock Paper Scissors game in 2023 as a weekend project, which has since grown to include an iOS app, a Turkish sister site, and a matchmaking queue over three years. Building the game revealed classic distributed systems challenges, including the need to withhold a player's move from their opponent until both picks are locked, preventing any timing-based cheating. A race condition bug emerged at launch when two users joined the same room simultaneously, both seeing an empty seat — a check-then-set flaw fixed using atomic Redis operations. The developer chose to keep all live match state in Redis with a time-to-live expiry, reserving PostgreSQL only for completed match records, which kept the database lean and allowed horizontal scaling. A silent failure in the iOS Live Activity feature, caused by a swallowed error in a token refresh path, went unreported for weeks, highlighting the danger of features that fail quietly without user-facing feedback.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in