samedi 5 septembre 2015

Can I depend on aggregate while preparing read-model

I am trying to implement CQRS model in some portion of my application, rest is handled in CRUD style. On write side when I post a command in the command handler I will load aggregate and generate necessary events and store them in EventStore and will publish those events for creating/updating read-models. And my questions are

  1. In command handler can I load CRUD handled entity/model while handling command for generating any events/validating the request?
  2. Here EventStore means it can be in memory event-queue/any sort of DB, right?
  3. Can I post events from related aggregates from command handlers?
  4. While generating read-models can I regenerate aggregate from past events along with current event?

Aucun commentaire:

Enregistrer un commentaire