Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are snapshots supported in EventStoreDB?

Tags:

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

like image 730
Nextgen Evangelist Avatar asked May 03 '13 12:05

Nextgen Evangelist


1 Answers

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)

like image 103
Greg young Avatar answered Nov 04 '22 14:11

Greg young