开发者

J Oliver EventStore V2.0 CommonDomain Snapshot

Whats considered best practice to take Snapshots of the aggregates when using EventStore and CommonDomain (Is there a be开发者_如何学运维tter place to ask, usergroup, something like that) ?


Stack Overflow is the best place for questions because everyone can benefit from the answers.

Snapshots should generally be taken "out of band"--that is out of the mainline of processing. In other words, when a series of events are being committed, you don't want to take a snapshot at that point. Instead, you'll want to have another thread or process take a snapshot asynchronously. I recommend another thread instead of a completely separate process because you don't have to worry about making sure your assemblies (domain, message, etc.) are the same as that for your main processing threads.

The code for "how" to take a snapshot is left up to you, the end user. I will very likely provide some additional guidance in the next week or so on the exact steps for taking a snapshot.

One additional consideration is, do you really need snapshotting? How many streams do you have that go above 1000 events? If none, then you almost certainly don't need the complexity of snapshotting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜