Is Snapshot supported from Greg Young EventStore?

故事扮演 提交于 2019-12-04 17:23:35

问题


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.

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


回答1:


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

Eg:

/streams/foo
/streams/too-domainsnapshot

When reading read the last snapshot off 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)



来源:https://stackoverflow.com/questions/16359330/is-snapshot-supported-from-greg-young-eventstore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!