質問

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)?

役に立ちましたか?

解決

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

Eg:

/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)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top