Domains

E-commerce

E-commerce software is a graveyard of systems that refused to accept stock is actually a promise.

2/8 chapters written

The software side of e-commerce looks deceptively familiar: product, cart, order. Everyone thinks they could draw an e-commerce system.

The trouble is that none of those three words describes anything fixed. A product changes by seller, a cart goes stale within minutes, and one order can be in three different states in three different systems at once.

What this file is really about is temporariness: how long a given piece of data stays true, and designing systems around that.

Contents

Unwritten chapters are listed too. The line beneath each is a promise of what it will cover.

  1. 01Stock is not a number, it is a reservationDecrementing a stock counter and promising something to a customer are not the same operation. Overselling almost always comes from confusing the two.
  2. 02A cart is not a table, it is a time windowDoes the price freeze at add-to-cart or at checkout? The answer is not a preference; it determines what promise the system is making.
  3. 03An order is a state machine, but whose?Payment, warehouse and shipping assign different states to the same order. There is no single truth.
  4. 04Why the promotion engine is always slowCombinatorial explosion as rule count grows, and why caching does not save you.
  5. 05A return is not a reverse flow, it is a new oneWhy systems that try to rewind an order end up breaking accounting.
  6. 06Search: relevance or revenueA relevant result and a profitable result are not the same thing, and someone has to choose.
  7. 07Marketplace: one product, ten different truthsWhy product identity, price and stock have to come apart once there are many sellers.
  8. 08Black Friday is not a load test, it is a design constraintWhat designing for one day of the year costs you on the other 364.

Read written chapters on one page