Read side implementation approaches using CQRS

前端 未结 1 2022
长情又很酷
长情又很酷 2021-01-31 10:45

I\'ve moved to the project which is actively using CQRS + event sourcing. From the first glance it\'s implemented in accordance with all those books and blogs, but finally I rea

相关标签:
1条回答
  • 2021-01-31 11:09

    The approach we use in our project looks a bit strange to me, I can't see all the drawbacks of it though.

    One prominent drawback is that upon receipt of the event, you have to make an additional call to the repository of the corresponding aggregate. This means that this repository must be exposed, either directly or as a service. In addition to increased dependencies is the additional IO.

    For rebuilding from an event store, the approach you describe is the generally accepted method. An approach described here makes use of an event log dedicated for rebuilding projections. This can be used to address performance issues while rebuilding. Also take a look at Scalable and Simple CQRS Views in the Cloud and on DDD/CQRS mailing list.

    0 讨论(0)
提交回复
热议问题