CQRS - how to handle new report tables (or: how to import ALL history from the event store)

前端 未结 3 1752
心在旅途
心在旅途 2021-02-03 10:30

I\'ve studied some CQRS sample implementations (Java / .Net) which use event sourcing as the event store and a simple (No)SQL stores as the \'report store\'.

Looks all g

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-03 10:47

    The 'EventRepository' only contains these methods because you only need them in production.

    When adding a new denormalization for reporting, you can send all event from start to you handler.

    You can do this on your development site this way :

    • Load your event log to the dev site
    • Send all events to your denormalization handler
    • Move your new view + handler to your production site
    • Run events that happened inbetween
    • Now you're ready

提交回复
热议问题