EventStoreDB支持快照吗? [英] Are snapshots supported in EventStoreDB?

查看:76
本文介绍了EventStoreDB支持快照吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在认真考虑使用Greg Young的 EvenStore 来实现基于事件的系统.但是,我不确定Greg Young的EventStore是否支持快照.快照是我的应用程序的关键要求,因为我们不想每次都重放所有事件以构造对象状态.

I am seriously thinking of using EvenStore from Greg Young, for implementing a system based on events. However, I am not sure whether EventStore from Greg Young supports Snapshots. Snapshots are key requirement for my application as we do not want to replay all the events to construct object state every time.

有人可以向我提供有关如何在EventStore(Greg Young版本)中创建快照的示例吗?

Could anybody provide me with samples on how to create snapshots in EventStore (Greg Young Version)?

推荐答案

是的,只需将它们放在流中并读取该流的第一个值(向后).

Yes, just put them in a stream and read the first value of that stream (backwards).

例如:

/streams/foo
/streams/foo-domainsnapshot

读取时,从快照流中读取最后一个快照,然后从其指向的版本中向前读取.

When reading, read the last snapshot from the snapshot stream, then read forward from the version it points to.

您还可以具有许多具有许多不同快照的流.我相信常见的域包装器已经对此提供了支持.

You can also have many streams with many different snapshots. I believe the common domain wrappers support this already.

另外,在我们的讨论组中(在网站上链接),这可能会得到更快的答复.

Also this would be answered faster likely in our discussion group (linked on website)

这篇关于EventStoreDB支持快照吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆