[DDD]Aggregate Design Canvas Template

date
Jan 21, 2022
slug
aggregateCanvas
status
Published
tags
DDD
summary
[DDD]Aggregate Design Canvas Template
type
Post

<Aggregate Name>

<Aggregate Name> - Description

Describe responsibilities and purpose of the aggregate and the reasons why such boundaries were chosen.
If the reasons for selecting boundaries is written in ADR, write the ADR's URL here.

<Aggregate Name> - State Transitions

Write state transitions of the aggregate using mermaid.
e.g.
stateDiagram-v2 Unopened --> Opened Opened --> Frozen Opened --> Closed Frozen --> Opened Frozen --> Closed

<Aggregate Name> - Enforced Invariants

List business invariants.

<Aggregate Name> - Corrective Policies

List the business logic which is required to correct some of the inconsistencies.
Loose business invariants may lead to these inconsistencies.

<Aggregate Name> - Handled Commands

The command for the aggregate is similarly to the method of the aggregate.

<Aggregate Name> - Created Events

List the events which occur when the above commands are executed.

<Aggregate Name> - Throughput

The goal of this section is to estimate how likely a single aggregate instance is going to be involved in concurrency conflicts.
command rate: Rate at which the aggregate is processing new commands.
number of clients: How many clients are likely to issue these commands.
e.g. Transaction Suite
metrics
average
maximum
command rate
1/d
10/d
number of clients
1
1
conflict chance
small
small

<Aggregate Name> - Size

This section of the canvas will help you estimate the hypothetical size of the aggregate.
event rate: how many events are appended to a single aggregate instance.
lifetime: how long the instance is going to live
e.g. Transaction Suite
metrics
average
maximum
event rate
1/d
10/d
lifetime
inf
inf
events persisted
small
medium
記事に関する疑問があればお気軽にご連絡ください。