Snapshotting

In the documentation under “What is an Event Store?”, you speak of Rolling Snapshots. Is there any support for this baked in?

If not, is there an extensibility hook to add it myself?

Thanks,

Chris

A snapshot just goes in another stream. When creating that stream you can say on the meta data of the create $maxCount = 1 which tells the event store you only needed the last entry. It will scavenge old versions of you snapshot for you. Eg I could have a stream foo and I could have foo_snapshot. When you read you would read _snapshot then read foo from version forward.

It being this is a common usage scenario it might be good for us to drop it I to the facade (or to put a facade/example on top of the connection)

where are the docs?!

This is covered in docs ($maxcount in reserced names). We are adding many more docs as well.

where are they kept though?

am I being blind - probs - but i can’t find them!

:stuck_out_tongue:

On geteventstore.com in doc section

but i cant find anywhere where it says “docs” :stuck_out_tongue:

i’m being slow i think

http://geteventstore.com/docs/

I believe there is a link but this may help. There are more coming as well as examples.

Cheers

Greg

Hi Wayne,

The gray button "Docs" to the right of the big green button "Download
now at GitHub". Missed it first time as well :slight_smile:

-- Andrii Nakryiko

oh yeah!!

that’s too hard to see - it needs to be on the top menu no?

Doh!

It never occurred to me to exploit the software for this. :wink:

Thanks!

As a heads up for everyone, the first event in your stream is StreamCreated, not the first event you put in it.

So if you’re expecting version 1, you’ll actually get version 2 straight away.

Makes perfect sense, and maybe it’s even documented somewhere, but it threw us for a few minutes to figure it out.

Happy Coding!

@scottcate

Yes the first event is the streamcreated we have had discussions about hiding this vs showing it.

It’s not that big a deal.

An aggregate will throw it away during replay and in the case of a snapshot, a null memento will be deserialized and I can ignore it.

Or I can just ignore eventtype==“StreamCreated”. :slight_smile: