Understanding Event Sourcing
In this section, we’re going to talk about Event Sourcing. We will also examine Event-Driven Architecture (EDA) and will break down the differences between EDA and Event Sourcing. Additionally, we mentioned CQRS previously, but in this section we will learn where CQRS fits into the whole picture, and I’ll explain it all in a way that’s easy to understand.
Event-Driven Architecture
In this section, we’re going to break down some key concepts in EDA. Figure 2.4 shows some basic examples of events and commands in this architecture.
Figure 2.4: Examples of events and commands
First up, we have events. Events are basically things that happen – such as a user logging in, or an order being placed. Then we have commands. Commands are like orders or requests, telling something else to do something.
Events can be communicated as event notifications, and commands as messages. These are pretty...