Concepts
- Items and locations: A balance is one item at one location. Items come from your catalogue, locations from the setup of your account.
- On hand, reserved, available: The three quantities of a balance, which command moves which, and the rule that keeps them honest.
- Movements are immutable: Every change is a movement that is recorded once and never edited or deleted. A mistake is corrected by a reversal.
- Revisions and concurrency: Each balance has a revision that grows with every movement. A command carries the revision it read and is refused if the balance has moved on.
- Idempotent commands: A command carries an operationId. Sent again, it returns the first outcome and changes nothing; a refused command leaves no record.