✅ How is aggregate in DDD related to event sourcing and CQRS?
I'm confused about the use of aggregate in a system with event sourcing and CQRS.
As far as I understand, CQRS write model emits domain events to the event store. Adding a domain event to the event store triggers a projection, which updates the CQRS read model.
Where does aggregate come in?
10 Replies
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
I keep seeing people talking about aggregate in event sourcing CQRS systems, so I'm really confused
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Yep, I understand DDD, CQRS and Event sourcing are separate things.
In an event driven architecture with microservices, we often couple event sourcing with CQRS. Where each microservice has its own event store (event sourcing), coupled with separate read model and write model (CQRS)
However I'm having a difficulty wrapping my head around where DDD and in particular, aggregates come in.
DDD to me is a way of designing microservices. It has 3 layers, application layer ( web api ), domain model layer ( entities, interfaces), infra layer ( repository implementation and efcore).
It sounds like aggregate is just projection
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Lol I'm trying to learn microservices, and all these jargons confuse me
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Microservices and DDD are, in fact, two independant concepts
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Upvote for this