- Architecture Overview
Aggregate is the main building block of a business model. From the application point of view it consists of the following:
- Commands which arrive to it.
- Events which appear in response to these commands.
- How these events influence the state of an aggregate.
Aggregates guarantee consistency of data modifications in response to commands they receive. Aggregate is the most common case of Command Handler. It modifies its state and produces one or more events in response to a command. These events are used later to restore the state of the aggregate. In Spine, aggregates are defined as Java classes, and their states are defined as protobuf messages.