Scopa2: A Geo-Distributed Multiplayer Game

   page       attach   
abstract

Scopa2 is an online two-player card game: a variant of the Italian Scopa Scientifica extended with a card-mutation mechanic based on Santi, playable through a native desktop client. Behind the game there is a deliberately distributed back end: two symmetric regions (Europe and North America)run the same stack on Kubernetes, the client picks the closest region by measuring latency at startup, and every component is replicated so that the death of a pod, of a database node, or even of an entire region does not interrupt a match. The two core ideas of the design are (1) modelling each match as an event-sourced deterministic state machine, so that any server can rebuild any game by replaying its move log, and (2) delegating the hard coordination problems (consensus, leader election, failover) to infrastructure that already solves them: YugabyteDB for Raft-replicated storage, Redis Sentinel for the cache and pub/sub tier, Kubernetes for scheduling and scaling. The report explains the design, the consistency trade-offs we made (CAP/PACELC), and how we validated the system with fault-injection tests on the live deployment.

outcomes