← Back
Home › Systems › Games

mmo-sharding

MMO world sharding

EVE Online

SystemTechniques · 8Primitives · 33 mmo-sharding 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.›SWIM gossip membershipdistributed · medium: Each node probes one random peer per period, asks k others on timeout, and piggybacks membership updates; constant load per node at any cluster size.›Two-phase commitdistributed · medium: Atomic commit across shards: participants durably vote yes, then the coordinator logs and broadcasts one decision; blocks if the coordinator is lost.›Interest managementgame-networking · medium: Send each client only the entities relevant to it (spatial area of interest, visibility, team), ordered by priority accumulators to fit a per-packet byte budget.›Simulation time dilationgame-networking · medium: Slow the simulation clock under overload so all clients stay consistent (EVE TiDi)Spatial shard handoffgame-networking · medium: Split a world into spatial shards and migrate entities between servers at boundariesWork-stealing dequeconcurrency · medium: Per-worker deque: the owner pushes and pops at the bottom without contention, idle workers steal from the top; the core of Rayon, Tokio and Go.›Reliable UDPgame-networking · low: Transport over UDP: each packet carries a sequence number, an ack and a 32-bit ack history; only chosen messages are made reliable.›Write-ahead logstorage · low: Append each change to a checksummed sequential log and fsync it before touching data pages; the basis of crash durability in nearly every database.›Quadtree octreegeometry · low: Adaptive spatial subdivision trees for queries and level of detail; loose and linear variantsSpatial hashingphysics · low: Uniform grid stored in a hash table: bucket objects by cell, test only neighbouring cells; O(n) neighbour search for many similar-sized objects such as particles.›Consistent hashingdistributed · low: Hash nodes and keys onto a ring; each key belongs to the next node clockwise, so membership changes move only about 1/n of keys.›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.›Event sourcingfinance · low: Persist state changes as an append-only stream of immutable events per entity; current state is a fold over them, guarded by expected-version appends.›Idempotency keysfinance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.›Snapshot delta compressiongame-networking · low: Encode each client's snapshot as the difference from the last snapshot that client acknowledged, so unchanged entities and fields cost zero to a few bits.›Optimistic concurrency controlstorage · low: Run transactions without locks, record what they read, and validate at commit that nothing changed; fastest when conflicts are rare.›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.›Lamport clocksdistributed · low: One integer per process, max-plus-one on receive; gives a total order consistent with causality using 8 bytes per timestamp.›fsync, O_DSYNC and O_DIRECThardware-os · low: What fsync, fdatasync, O_DSYNC, O_DIRECT and F_FULLFSYNC really guarantee on Linux and macOS, and the exact call sequences for crash-safe files.›d-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›Hdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentiles+ 1 more techniques+ 17 more primitives

Similar systems

Share the most building blocks with this one.