So I'm resending this because for some reason you can't do a proper reply from a search in GG (sorry for sending twice Nuno).
So I think a more general answer is needed for this question and I'm going to pose a different example to see if it can help. So again going from my product catalog example, lets say my commands look like this:
- CreateNewProduct
- SetProductFeatures
- RemoveProductFeatures
- AddProductToCategory
- RemoveProductFromCategory
etc. (speak up if you think these look like lame commands for some reason)
Now, lets say I get a bulk source of data on a regular basis that I want to use for doing updates of product data. The way I see it I have the following approaches:
A) Via some service layer I process the bulk data and for each product I create the necessary commands to add and update the products in my catalog. This has the downside of creating multiple commands per update and multiple events. It also isn't entirely representative of what the user performing the bulk update actually did.
B) I add two commands CreateNewProductFromBulk, UpdateProductFromBulk which contain more fields representing everything that a bulk update to a product can change the command handler then calls the appropriate behaviors again producing a series of events
C) I add the same commands as in B, however I map this to a new behavior on the domain model that produces a single event. This seems to have the unfortunately side effect of introducing the concept of bulk updates to the domain model though where it doesn't feel like it belongs.
Perhaps, part of my concern comes from the handling of events. I am working with MongoDB and each event will result in a separate and granular change to a single document which seems like excessive churn. Perhaps there is simple a better way to handle updating my read model.
Chris