Before looking into the details of event-driven architectures, we are going to start by learning about some key aspects surrounding them.
The applications created using this approach are developed with two different but related concepts in mind:
- Commands
- Events
Let's look at a brief definition of each of these concepts.
A command is an operation performed within an application that emits one or more events as the result of a successful or failed execution. We can think about these as operations that are intended to modify the state of a system.
Commands are called actions. This makes a lot of sense if we take their intended use into consideration. The following list shows some examples of such commands:
- Transfer money
- Update user information
- Create an account
It's highly recommended that you use present tense verbs for naming commands, as demonstrated with these examples.