Thursday, December 20, 2018

CQRS+ES question

I'm working on a side project where I think parts of it would really benefit from CQRS+ES, but I'm having issues with the scale of some things.

One of the processes of this project reads in a catalog from a 3rd party and updates the internal model of the catalog. My current thought process is:

Aggregate Root: Catalog. Catalog maintains a list of Products.

  1. Load the aggregate, which processes all previous events (I haven't yet done snapshots but that will need to happen sooner rather than later)
  2. Compare the loaded aggregate with the 3rd party catalog. New products result in ProductAdded events, updated products result in ProductUpdated events, and products no longer in the catalog result in ProductDropped events.
  3. Dispatch a CatalogUpdated event that mostly just serves as a marker
  4. Projections (not yet implemented) will give me access to the individual products

Within this bounded context Products will never be used individually, but I'm concerned about the size of the aggregate. I don't know if this is a well-founded concern or not. In most cases I would expect a catalog to have between 500 and 5000 products, each of which may have 20 properties?

CQRS+ES question Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team