-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements and documentation for snapshotting #60
Conversation
Changed snapshot class to use event entity version integers (was timestamps). Added snapshotting to example application. Added step about snapshotting to usage section of README file.
Changed snapshot class to use event entity version integers (was timestamps). Added snapshotting to example application. Added step about snapshotting to usage section of README file.
handling, and this isn't really something for production, so removed it at least for now).
1 similar comment
last = page[-1] | ||
page = list(query.filter(pk__token__gt=Token(last.pk))) | ||
|
||
def delete_record(self, record): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit scary for event sourcing;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it doesn't make something possible that was previously impossible. :-) I added this method to check the snapshots are working in all DBMSs. There is room for improvement in the snapshot tests, and maybe this could be removed. Or maybe it should be accompanied by a method to update an event? I'm not sure...
Looks nice. One thing I was thinking of is the Cql models might do to have an ABC, and change any Example - my use case has a fairly static, low entity count (maybe 20) aggregate, and then very dynamic, high count entity, which may be regionally partitioned. Making an ABC would make sense both from an ease of implementation, and from an ease of upgrade. |
Thanks. It seems simpler and better to make the snapshots have the version numbers of the events, rather than timestamps. Could possibly introduce a method to search for the last version at a given time. I tried to make the active record classes derive from a common library supertype, but it broke the ORMs so I had to abandon the attempt - if that's what you mean? Also, what did you mean by "high count entity, which may be regionally partitioned"? |
No description provided.