C
C#10mo ago
salty_pepper

✅ 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
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
salty_pepper
salty_pepperOP10mo ago
I keep seeing people talking about aggregate in event sourcing CQRS systems, so I'm really confused
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
salty_pepper
salty_pepperOP10mo ago
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
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
salty_pepper
salty_pepperOP10mo ago
Lol I'm trying to learn microservices, and all these jargons confuse me
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
Scytale
Scytale10mo ago
Microservices and DDD are, in fact, two independant concepts
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
Scytale
Scytale10mo ago
Upvote for this
Want results from more Discord servers?
Add your server