Distributed Systems · Data across services
CQRS
CQRS gives writes one model that checks the rules and gives each screen its own read model, fed by events or the database's change log. It costs lag and moving parts, and most systems don't need it.
- Time22 min
- LevelSenior
- Experiments1 live
- Check6 questions







Command PlaceOrder for cart 7 arrives at the write model.
Commit save the order and an OrderPlaced outbox row together.
Project upsert one order_history row and record the position, in one transaction.
Query the history page reads that row by customer, with no joins.
Screens send commands; query read models.