So now I am immersing the CQRS architecture with the EventStore template.
It opens up applications for a new dimension of scalability and flexibility, as well as for testing.
However, I still adhere to how to handle data transfer correctly.
Here is a specific use case:
Let's say I want to manage blogs with articles and comments.
On the write side, I use MySQL and on the read side ElasticSearch, now every time I process the command, I save data on the write side, send an event to save data on the read side.
Now let's say that I have a ViewModel named ArticleSummary
, which contains the id and title.
I have a new function request to include article tags in my ArticleSummary
, I would add some dictionary for my model to include tags.
Given that tags already exist in my record layer, I will need to update or use a new “table” to correctly use the new included data.
I am aware of the EventLog Replay strategy, which is to replay all events in order to “refresh” all ViewModel, but seriously, is this viable when we have a billion lines?
Are there any proven strategies? Any feedback?