Event aggregate root aggregate versus aggregate

What is the difference between the "root aggregate" and the "aggregate" in the event store?

I’m having trouble pinpointing them even after hours of searching. I understand that an aggregate is a table of identifiers that often group events (collections) inside the repository with object representations, therefore there can also be an aggregate type.

In addition, I saw pivot tables with version numbers, which I am confused on the assumption that they are, in fact, group / container / aggregate identifiers representing a collection of events.

+4
source share
2 answers

So, we agreed that you are trying to create event streams in the DDD Aggregate Root and Aggregate arrays.

There is a common template in which each unit has its own flow. It has the name and identifier of the cumulative root, although part of the name is optional.

All operations on the entire set are represented by events, which are then written to this stream.

So, if you have an aggregated root MyNamespace.Orderthat has several objects or objects of a child value MyNamespace.OrderLine, all operations on strings are performed by accessing the aggregated root methods, and all events are recorded in one stream, so for an order with id 123 this will be:

Stream: MyName

  • space.Order-123
  • OrderPlaced
  • OrderDeliveryAddressSet
  • OrderLineAdded
  • OrderLineAdded
  • OrderLineRemoved
  • OrderConfirmed
  • OrderETASet
  • OrderPaid
  • OrderDispatched
  • OrderDelivered

, , , . , .

, . , .

concurrency. , . , , . , concurrency, - , , .

"" , . , , . , .

+5

DDD ( A Thing).

SE Radio podcast 226 .

- , ( ),

, "" (, -, , )

( ), "", , ( ).

" DDD" " " . IIRC. ( ) " " ( )


( DDD-CQRS-ES) , , ( , ). Denormalized View ala "" ( ). . , . ( , ( )) - blob, , , , , . , ( ), , . . .

+2

Source: https://habr.com/ru/post/1668133/


All Articles