-
Create an account with a simple operation 'deposit' without event
-
Transform this operation deposit to an event Note : an event describe a fact that already happened !
-
Persist account
-
Reload the state of an account
-
Create another operation like 'withdraw'
-
Make commands as input of your system for 'deposit' and 'withdraw'
-
Dispatch events synchronously, which are listened by a a reader
-
Make a projection of an account
-
how to solve concurrency ?
- How to deal with a slow state rebuild ?
- How to deal with two commands fired on a same account ?
- How to deal with the reading order when two events come to the same account ?
-
Scalability : split them all !