Skip to content

Workflows, money and bookings

Module 11 of the System Design Masterclass. Every lesson here is free to read, with no account.

  • 9 lessons
  • 3 h 37 min of reading
  1. 66Workflows as state machinesHow to describe an order, a payment or a booking as a list of states and a table of legal moves, so that a wrong or repeated message cannot put it in a wrong state.12 minCore
  2. 67Many steps, one undo plan (sagas)How to finish a job that spans several services when one database transaction cannot cover it: steps with compensations, who runs the plan, and why two-phase commit is rare.24 minCore Fast track
  3. 68Ledgers and reconciliationHow to keep money records that can always be explained: an append-only ledger with balanced entries, payments that stay pending until confirmed, and a daily check against the gateway's report.24 minCore Fast track
  4. 69Webhooks and third-party integrationsHow to receive a webhook safely (signature, fast reply, repeats, wrong order), how to send one to many receivers, and what to read in a provider's promises.24 minCore
  5. 70Case study: Payment system (UPI, cards; wallet twist)How to design the payment part of an app: one key for each payment, a state machine, safe callbacks, a ledger, an outbox, a daily check against the gateway, and a wallet version.28 minCore · Case study Fast track
  6. 71Case study: E-commerce checkout and flash saleHow to design checkout for an online shop (catalog, cart, stock, order, fraud check) and how to keep one hot item correct when a million people press Buy on a big sale day.28 minCore · Case study
  7. 72Case study: Ticket bookingHow to design ticket booking for trains and cinemas: seat states, a hold that expires, a waiting room for the 10 am rush, payments that finish late, and a version for hotel rooms.28 minCore · Case study
  8. 73Case study: Notification systemHow to design one system that sends push, SMS and email: separate lanes for urgent and bulk messages, fan-out to 50 million users, retries, duplicate protection and per-user limits.25 minCore · Case study
  9. 74Case study: Job schedulerDesign a job scheduler: store jobs by run time, let workers claim due jobs, handle crashed workers and repeats, make cron entries fire once, and find the point where the database is too slow.24 minDepth · Case study

The AI tutor is the part you sign up for

Reading is free for everyone. A free account adds the tutor, quizzes, notes and your progress.