Questions tagged [aggregate]

An aggregate is either a group of related objects/data or the result of some operation on such group. The tag can be used for example for language specific data structures, algorithms that combine data and GROUP BY queries, UML relationships, or DDD aggregates that combine dependent objects.

20 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
3 answers
2k views

Balance between aggregate boundaries and domain consistency in DDD

Designing an Aggregate and choosing an Aggregate Root getting tricky for me all the time especially when it comes to ensuring right transactional contexts and consistency constraints so I'm wondering ...
user avatar
  • 431
4 votes
2 answers
458 views

Domain Events Grouping/Buffering

Suppose I have 3 domain events, Event1 Event2 and Event3. When command arrives at my Service Layer, I can rise 2 commands at the same time - e.g. Event1 and Event2. One Class has event listener for ...
user avatar
3 votes
0 answers
1k views

DDD problem with aggregate design (users, authentication)

We're having a bounded context dealing with payments. I'm trying to model case, where Merchant can create another merchant and inherit some of its properties in this case: users that are needed for ...
user avatar
  • 217
2 votes
0 answers
664 views

Product, Category, Attributes modelling in DDD

I'm trying to model online shop catalog using Domain Driven Design. There are three main concepts I have right now: Product, Category, Attribute. Attribute is a characteristic of a product. For ...
user avatar
1 vote
0 answers
219 views

DDD - Entity is shared by multiple Aggregates

i wonder what is the correct solution to ensuring consistency of a shared aggregate? Problem statement I try to model the registration at an event with reserved (and limited) seats (like shopping cart)...
user avatar
1 vote
0 answers
348 views

Where to place the Value Object code that is shared by more than one Aggregate Root?

I have 2 Aggregate Root: One is the Lessor user, and the other is the Lessee user. class Lessor extends AggregateRoot {} class Lessee extends AggregateRoot {} Each of these Aggregate Roots has a ...
user avatar
1 vote
0 answers
133 views

Commiting transaction in the repository instead of the application service

After quite some time thinking about it, and testing both methods, I'm really struggling with choosing the right manner to commit my transactions. To shape the context, we are in the context of ...
user avatar
  • 427
1 vote
0 answers
2k views

DDD - Does Many to many relationships mean two different aggregate roots?

I'm facing the following issue: I have a very simple aggregate root Product, and a product contains Image entities. Right now in code this relationship is expressed as a Many to One relationship like ...
user avatar
1 vote
0 answers
149 views

Collecting sports data from many sources in many formats

I'm trying to solve a problem that exists for a sport. The sport is fragmented into many federations, and each federation is completely isolated from other federations. The sport is the same for each ...
user avatar
  • 121
1 vote
0 answers
221 views

Data Store Design for NxN Data Aggregation

I am trying to come up with a theoretical solution to an NxN problem for data aggregation and storage. As an example I have a huge amount of data that comes in via a stream. The stream sends the data ...
user avatar
  • 111
0 votes
1 answer
92 views

How do I identify ways to break apart an Aggregate that has become my entire application?

I am developing an algorithmic trading framework using DDD/event-driven principles. I've decided the following components sit within my bounded context: Data feed -> [Entry Point] -> "...
user avatar
  • 1,119
0 votes
0 answers
66 views

Domain-driven Design: Aggregate root property is a collection of other independent aggregate roots

In my domain model I've got two principal entities: User and Event, both which I've decided to make aggregate roots. Users and Events have a one-to-many relationship wherein Users can create several ...
user avatar
0 votes
0 answers
61 views

Splitting nested entities keeping invariant within aggregates

I'm currently developing message imap-based module in crm app and i'm trying to connect dots using ddd principals. I've started with three main entities, all bound under Account Aggregate: Account - ...
user avatar
0 votes
0 answers
162 views

DDD shared concepts between entities

Currently there's an aggregate root "Party" which for now only can be an insurance policy holder. A party can have multiple addresses, communication addresses (telephone, mail, ..), contact ...
user avatar
  • 183
0 votes
0 answers
22 views

Should aggregated data include meta data?

I want to create a aggregation job that executes a big db query and flush it into BigQuery. My question is should I include only the id of the entities (campaign id, advertiser id, user id) or should ...
user avatar
  • 109
0 votes
0 answers
396 views

DDD: aggregate root and references to child entities

I'm struggling a bit to grasp all DDD concepts and apply them to a real project. Let's say I have the following domain concepts: Car: a vehicle moving inside an area Path: a journey made by a car, ...
user avatar
0 votes
0 answers
66 views

How to model relationships in scenario where every product can (don't have to) be associated to only one category

This one still occupies my mind. How do you model 1:N relationships. Consider having a category and product (typical e-commerce scenario). Every product can (don't have to) be associated to only one ...
user avatar
-1 votes
0 answers
52 views

DDD - Aggregate invariant and how to create required children aggregates

I've recently been delving into DDD resources (books--Vaughn Vernon's--and other online resources) and in my attempt to do two things at once (work on a pet project and apply what I've been learning) ...
user avatar
  • 1
-1 votes
2 answers
388 views

Merging aggregates with Event sourcing

I'm currently evaluating Event Sourcing and CQRS for an implementation of a new business requirement at my day job. While I can't really speak about the actual business problem, I can give a few ...
user avatar
  • 107
-2 votes
1 answer
154 views

Filling in background information in terms of DDD

Recently, I asked about my difficulties in finding the boundaries of aggregates here and I recently reinterpreted it and rid it of business features and now it sounds like this: In many sources, ...
user avatar
  • 133