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
Copy file name to clipboardExpand all lines: README.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,18 +15,22 @@ _From "Domain-Driven Design: Tackling Complexity in the Heart of Software" by Er
15
15
However, Event Sourcing with DCB has some advantages/solves some pitfalls over a traditional aggregate setup.
16
16
17
17
### Reusable domain events
18
-
Traditionally, a defined boundary enforces a strict 1-on-1 relation between an aggregate and a domain event.
19
-
This makes the aggregate internally consistent. The DCB pattern removes this strict 1-on-1 relation. Instead, a domain event is considered as a _Pure event_.
18
+
In traditional event sourcing (if we call it like that already 😛), there’s usually a strict one-to-one relation between an aggregate and a domain event,
19
+
which helps keep things internally consistent within each aggregate. The DCB pattern takes a different approach by loosening this rule and treating domain events as so-called _pure events_.
20
20
21
-
This allows us to create business decision/domain models based on a **subset of specific domain events** as well as from **multiple domain identities**.
21
+
This opens up new possibilities for building business decision models based on selected domain events,
22
+
also when these events spread across different domain identities.
22
23
23
-
These business decision models fit very well in how [EventStorming](https://github.com/ddd-crew/eventstorming-glossary-cheat-sheet) considers aggregates currently.
24
-
Instead of aggregates, in EventStorming, these are now called 'system' or 'consistent business rule',
25
-
as the term 'aggregate' is difficult to explain for non-technical actors in a software design process.
24
+
This approach lines up well with how [EventStorming](https://github.com/ddd-crew/eventstorming-glossary-cheat-sheet) looks at aggregates.
25
+
In EventStorming, what we typically call aggregates is nowadays seen as "systems" or "consistent business rules", making the concept easier to grasp for non-technical actors involved in the design process.
26
26
27
-
### No aggregate synchronisation nor domain services needed
28
-
As a domain event can be used by multiple business decision models, there is no synchronization needed between aggregates.
29
-
Duplicated events as well as domain services (typically to handle business logic spanning multiple aggregates) are not needed anymore.
27
+
By replacing aggregates with business decision models with the DCB pattern, we’re aligning more closely with EventStorming’s focus on "business rules".
28
+
This brings our software closer to the actual problem space and avoids so-called _accidental complexity_ that is introduced with the translation to aggregates.
29
+
30
+
### No need for aggregate synchronization
31
+
With domain events now usable across multiple business decision models, there’s no longer a need for synchronization between aggregates.
32
+
This means that e.g. domain services, which are typically used to manage business logic that spans multiple aggregates, are not needed anymore.
33
+
Also, sagas, used to subscribe to domain events in order to synchronize with other aggregates, are not needed anymore.
30
34
31
35
### Concurrency problems
32
36
As an aggregate is based on internal consistency, two concurrent modification are impossible,
@@ -70,4 +74,4 @@ bin/console gember
70
74
Or run the demo command to run random sets of commands automatically:
0 commit comments