You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foreseaz edited this page Sep 11, 2020
·
3 revisions
Aggregates
The Aggregates concept is from DDD (Domain Driven Design), the Commands are executed by objects that encapsulate domain logic and these objects (called Domain Objects) are grouped into Aggregates. In a CQRS app, an aggregate is a transaction boundary, which means that any given aggregate should be able to execute its commands without communicating with other aggregates.
Commands
Command is:
A request (imperative sentence)
May fail
May affect multiple Aggregates
For example: Index Block, Run Cron Job
CMD1 - Index Block
Events
Statement of facts that happened (past tense).
Never fails.
May affect a single Aggregates.
For examples: Block Indexed, Current Block Tx Collected