Amazon's shopping cart looks simple. Under the hood: eventual consistency + always-add semantics + inventory awareness. Classic Dynamo paper's motivating use case.
Always add, never lose
Adding to cart never fails. Even if item soon becomes unavailable, cart entry stays. User sees it at checkout with 'unavailable' badge.
Always add, never lose
Adding to cart never fails. Even if item soon becomes unavailable, cart entry stays. User sees it at checkout with 'unavailable' badge.
Eventually consistent replicas
DynamoDB replicates cart. Reads may show stale. Adds converge. Removals resolved by vector clocks (concurrent add + remove → add wins).
Multi-device merge
Add on phone, checkout on laptop. Session store links devices via user ID. Cart merged across.
Inventory check late
Adding doesn't reserve inventory. Only at checkout time. Prevents zombie reservations from browsers left open.
Recommendations in cart
'Customers who bought X also bought Y'. Contextual to cart contents. Small revenue boost, massive personalization signal.