← Back
Home › Systems › Consumer applications

chess-platform

online chess platform

Lichess, Chess.com

SystemTechniques · 16Primitives · 49 chess-platform Actor modelconcurrency · medium: Isolated units of state that interact only by queued messages and handle one at a time: no locks on state, and the same code runs local or remote.›Deterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Primary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›Pub/sub fan-outdistributed · medium: Deliver one published message to every subscriber of a topic by sharing one encoded payload and giving each connection a bounded queue with an explicit slow-consumer policy.›Swiss-system pairinggame-networking · medium: Each round pairs competitors with equal scores, never twice and with balanced sides; a bye covers odd counts, and about log2(N) rounds expose a winner.›Pairing queueoptimization · medium: Pair waiting players into fair matches by rating and latency, widening tolerances the longer each ticket waitsCoverage-guided fuzzingsecurity · medium: Mutate inputs, run an instrumented target, and keep any input that reaches a new code edge; feedback turns blind guessing into incremental search.›Glicko-2game-networking · low: Rating plus rating deviation (RD) and volatility per player, so new or inactive players move fast and established ones move slowly.›Compact state encodingdata-structures · low: Pack a game position into a few fixed bytes (24 for chess: occupancy bitboard plus nibbles) for training data and dedupeHdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesLag-compensated turn timer with a r…distributed · low: A server-side turn timer that credits back each move's measured network lag, capped per move and by a quota that refills a fixed amount per move.›Process supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›epoll event loopnetworking · low: One thread waits on thousands of non-blocking sockets with epoll_wait and handles only ready ones; the core of nginx, Redis and tokio.›WebSocketsnetworking · low: Full-duplex message framing over one upgraded HTTP connection; the standard way to push real-time data to browsers.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Graceful drainingsystems · low: On a termination signal, stop taking new work, finish in-flight work until a deadline, tell clients to reconnect elsewhere, then exit; clients resume from a token.›Hierarchical timing wheelsystems · low: Timers bucketed by expiry into wheels of slots, coarser wheels for far deadlines: O(1) insert and cancel for millions of timeouts.›Token bucketsystems · low: A bucket of up to b tokens refilled at rate r; requests spend tokens, enforcing an average rate while allowing bursts of b.›Cooperative schedulingconcurrency · low: Green threads/coroutines yielding at await points on a user-space schedulerMPMC bounded queueconcurrency · low: Vyukov's array queue for many producers and consumers: each slot carries a sequence number, so one CAS per operation claims a slot without locks.›Record replaydistributed · low: Record every nondeterministic input (time, randomness, I/O, model and tool outputs, per-tick player input) and re-execute deterministically for debugging, replays and state rebuildPRNGs (PCG, xoshiro)numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.›Leasesdistributed · low: A lock that expires on its own: bounded-time ownership that survives crashes and partitions, given bounded clock drift and fencing tokens on writes.›+ 9 more techniques+ 33 more primitives

Similar systems

Share the most building blocks with this one.