I think that storing snapshots after each change is a bad idea. We will have more problems with more changes.
As an alternative I could suggest following approach.
Let's imagine that we have some constant for a backend instance. For example 10.
Than for every tenth version we should store new snapshot. E.g. after each addChange operation we look at version and if it's tenth we should request snapshot creation.
Snapshot creation procedure will take latest snapshot and apply only ten latest changes which we could get since we could use since version argument.
This way we will save a lot of resources. And this constant we could choose depending on performance tests.
@michael, @oliver any thoughts?
I think that storing snapshots after each change is a bad idea. We will have more problems with more changes. As an alternative I could suggest following approach. Let's imagine that we have some constant for a backend instance. For example 10. Than for every tenth version we should store new snapshot. E.g. after each addChange operation we look at version and if it's tenth we should request snapshot creation. Snapshot creation procedure will take latest snapshot and apply only ten latest changes which we could get since we could use since version argument. This way we will save a lot of resources. And this constant we could choose depending on performance tests. @michael, @oliver any thoughts?