← Back
Home › Systems › Payments and commerce

event-ticketing

live-event ticketing with fair seat allocation

Ticketmaster, Eventbrite, StubHub

SystemTechniques · 27Primitives · 90 event-ticketing 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.›Offline mutation queuedistributed · medium: Apply actions locally at once and queue them durably; on reconnect replay the queue idempotently, then re-apply unconfirmed ones on the server state.›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.›Saga patterndistributed · medium: Split a cross-service operation into local transactions, each paired with an undo; on failure run the undos in reverse, or retry forward.›Inventory reservationfinance · medium: Reserving stock with TTL holds, release on timeout and no overselling under contentionPayment state machinefinance · medium: Persisted state machine for a payment lifecycle (authorize, capture, void, refund) that treats timeouts as unknown, retries with the same key and applies webhooks idempotently.›Bot detectionsecurity · medium: Combine declared identity, rate and timing, network, behaviour and integrity signals into one score per client, then map thresholds to allow, log, limit, challenge or block.›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.›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.›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.›Event deduplication windowdistributed · low: Keep the ids of recently accepted events for a time window and drop repeats; memory stays bounded by rotating time buckets instead of per-entry timers.›Sharded countersconcurrency · low: Split one hot counter into per-core or per-thread cells on separate cache lines; increments stay local and reads sum the cells.›Barcode symbologiesdata-structures · low: Encode/decode 1D and 2D barcodes (Code 128, DataMatrix, QR) with their error correctionHdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesDouble-entry ledgerfinance · low: Append-only journal of transactions whose postings sum to zero per currency; balances are derived, so money can only move, never appear or vanish.›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.›Csprngsecurity · low: OS-backed cryptographically secure random numbers (getrandom), and when a fast PRNG is not enoughDigital signatures (Ed25519)security · low: Small, fast, deterministic public-key signatures that prove who produced a message; the default for tokens, releases and protocols.›JSON Web Token (JWT)security · low: A signed, URL-safe token carrying claims; the verifier's job is the checklist (pinned algorithm, key by kid, exp, aud, iss), not the format.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›One-time codes (HOTP, TOTP)security · low: Short numeric codes derived from a shared secret plus a counter or the clock (HOTP, TOTP), or random codes sent by SMS or email; safe only with expiry, single use and attempt limits.›GCRAsystems · low: Generic Cell Rate Algorithm: a token bucket stored as one theoretical arrival time per key, updated with one compare-and-swap; exact limits in 8 bytes.›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.›+ 20 more techniques+ 74 more primitives

Similar systems

Share the most building blocks with this one.