在分布式架构中创建快照
我正在考虑问题标题中的问题:如果我必须在分布式架构中查询聚合,其中分布式事件存储最终可以等待最后一个事件的分发。我如何知道聚合是否是通过读取模型进行的读取不会被网络另一台服务器中更新的模型所取代?
我有一个 http 服务器,用于接收事件并保存在商店中。商店实际上不存在,但我想尽快实施。 事件考虑到以 json 格式序列化的巨大聚合需要 4MB
另一个子问题是您建议为快照使用什么存储?
编辑
我不明白问题是否写得不好或者我选择了错误的标签......
I'm thinking about the problem in question title: if I have to query for an aggregate in a distributed architecture where the distributed event store can eventually be waiting for last events to be distributed.. How can I know if the aggregate i'm reading via read model is not being replaced by the updated one in another server of the network?
I have an http server that receive events to save on the store. Store not exists actually but I want implement it soon.
Events regards huge aggregate that serialized in json format takes 4MB
Another sub-question is what storage do you recommend for the snapshot?
EDIT
I don't understand if the question is not written well or if I have selected wrong tags...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
知道分布式存储中的“最后”事件何时被处理的能力取决于两件事:
CAP 定理 是一个很好的参考,可以帮助您解决这两个问题在分布式数据存储中;一般来说,除非你放弃可用性,否则你将无法拥有获得你想要的东西所需的房产。
另一方面,如果你能以有意义的方式定义最后一个,你仍然可以获得你想要的。例如:您的活动会在一段时间后过期吗?例如,如果它们在 12 小时后过期,您知道您始终可以有意义地将 last 定义为“12 小时前的时刻”,因为任何早于该时间的未处理事件都已过时......
要回答您的子问题,我强烈推荐您不要自己编写存储引擎,因为分布式数据存储是一个非常困难的问题,许多非常聪明的人正在为您解决这个问题,他们为公司工作,除了解决这个领域的问题之外什么也不做。
而是利用他们的工作。
The ability to know when the "last" event in the distributed store is processed depends on two things:
The CAP theorem is a good reference to the sort of problems you are going to have with both of those in a distributed data store; in general, unless you give up availability you are not going to be able to have the properties needed to get what you want.
On the other hand, if you can define last in a meaningful way, you can still have what you want. For example: do your events expire after a while? If, for example, they expire after 12 hours, you know that you can always meaningfully define last as "the moment in time 12 hours ago", because any unprocessed event older than that is obsolete...
To answer your sub-question, I strongly recommend a storage engine that you do not write yourself, because distributed data storage is an awesomely hard problems that many very smart people, working for companies doing nothing but solving problems in this space, are doing for you.
Leverage their work instead.