카테고리 없음

DDD Aggregate 정리

_soboro 2024. 4. 6. 19:24

- reference other aggregate by id

- changes ar commited

- rolled back as a whole

- chagnes to an aggregate are done via the root

 

how to find aggregate step

- define eache= of the entites is an aggregate

- Merge aggregates to enforce invariants (불변량)

- Merge aggregates that cannot tolerate eventual consistancy

 

Good question for find aggregate

- Does the entity make sense without the other entity (if yes it might be aggregate root)

- Will it need to be looked up by id

- Will it be referenced by other aggregates?

 

etc

- A aggregate 가 B aggregate의 데이터를 바꾸는 것을 도메인 이벤트라고 한다. 

 

refrerence

https://www.youtube.com/watch?v=UEtmOW8uZZY&t=33