← Back
Home › Systems › Consumer applications

live-commerce

live shopping platforms

Taobao Live, Douyin/TikTok Shop LIVE, Whatnot, QVC (broadcast)

SystemTechniques · 20Primitives · 83 live-commerce CDN and edgecloud · medium: CDNs cache content in hundreds of PoPs near users, cutting latency and egress bills; edge compute runs small code there. Bandwidth price spreads 10x between providers.›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.›Inventory reservationfinance · medium: Reserving stock with TTL holds, release on timeout and no overselling under contentionOrder lifecycle state machinefinance · medium: Order states (new, partial fill, cancel/replace, rejected, expired) with strict transitions and idempotent eventsPayment 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.›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.›Media containersmedia · low: MP4/ISO BMFF, fragmented MP4/CMAF, Matroska and MPEG-TS mux/demuxSharded 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.›Hdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesMoney representationfinance · low: Store money as integer minor units with an explicit currency exponent, compute in wider integers, and round once with a named rounding mode.›Proxy biddingfinance · low: Proxy bidding with bid increments: winner pays one increment above the second-highest maxReliable 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.›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.›Hardware video accelerationmedia · low: GPU/ASIC encode and decode APIs (NVENC, VideoToolbox, VA-API) with zero-copy surfacesRTP and RTCPmedia · low: RTP stamps each media packet with sequence number, media-clock timestamp and source ID; RTCP reports loss, jitter, round trip and clock mapping within a bandwidth cap.›Stream timed metadatamedia · low: In-band timed metadata (ID3, emsg, DATERANGE) aligned to media timelines in streaming manifests and segmentsWebSocketsnetworking · low: Full-duplex message framing over one upgraded HTTP connection; the standard way to push real-time data to browsers.›Aho-Corasick multi-pattern matchingsearch-sort · low: Find all occurrences of many fixed patterns in one pass over the text, in time independent of the pattern count, using a trie with failure links.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Optimistic concurrency controlstorage · low: Run transactions without locks, record what they read, and validate at commit that nothing changed; fastest when conflicts are rare.›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.›+ 13 more techniques+ 67 more primitives

Similar systems

Share the most building blocks with this one.