Hi
I was recently trying to design and Event sourced based system and struggling with Aggregate and Entity boundaries.
My problem is I am having a complex domain model with too many hierarchy. For example my domain model looks like this
class Parent {
name;
description;
List<Child1> children;
}
class Child1{
name;
List<ChildOfChild1> childrenOfChild1;
}
class ChildOfChild{
name;
}
Now my problem is how should I handle any events which are related to ChildOfChild. Should I apply them from Parent Aggregate root?
Can Child and ChildOfChild could also become aggregates with reference to parent aggregate identifier?
Why I am considering of keeping Child and ChildOfChild as separate AR because not every time someone asks for Parent, will be interested in Child and ChildOfChild data. Then why reduce performance and apply events for them as well.