Skip to content

Latest commit

 

History

History

event-sourcing

Event Sourcing

This folder contains a sample project for Event Sourcing (for simplicity without using events though).

The typical example of a bank account is used, as it perfectly demonstrates that a sequence of balance modifications (IncomingPayments and OutgoingPayments) can be used to determine the current balance at any point in time.

The key aspect of Event Sourcing is that the current balance isn't stored anywhere in the code but rather evaluated each time it is requested. That's why it often includes the CQS principle to separate the balance modification (commands) from reading access to it (queries).