CQRS,DDD假唱报告数据库假唱、数据库、报告、CQRS

2023-09-03 10:30:58 作者:血色红魔

我们正在努力CQRS和DDD和事件的采购。比方说,我有一个客户更新的电子邮件地址,这触发了CustomerUpdatesEmailAddress事件,这个经历给我的操作(写DB)和更新表。我们的系统被设计成有一个ETL过程运行这需要运营数据并更新数据库(这是一个读数据库)。鉴于该ETL可以做基于电子邮件地址,一些繁重的被改变(电子邮件地址仅仅是一个例子),我们如何同步跟进报告数据库(数据集市和运营方)作为用户希望立即看到在屏幕中的电子邮件地址更新?

We are trying CQRS and DDD and event sourcing. Let's say I have a customer update an email address, which fires out CustomerUpdatesEmailAddress Event, this goes through to my operational (write DB) and updates the tables. Our system is designed such there is an ETL process that runs which takes operational data and updates the database (this is a read database).Given that the ETL can do some heavy lifting based on email address being changed (Email address is just an example), how do we sync up reporting database (DataMart and the operational side) as the user wants to see the email address update immediately in the screen?

推荐答案

在this播客 乌迪大寒状态(例如幻灯片47),客户端不必等待读取网站获得更新。客户端可以假的。因此,例如,如果用户更改他或她的电子邮件地址,客户端可以从它发出的命令,新的地址,并显示给用户的之前命令实际上已被处理。

In this podcast (slide 47 for example) Udi Dahan states that the client doesn't have to wait for the read site to get updated. The client can "fake" it. So for example, if a user changes his or hers email-address, the client can take the new address from the command it sent and show it to the user before the command has actually been processed.