You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Repository.get_aggregate method is not very efficient - it fetches all events that were used to create an aggregate. In order not to do that we want to introduce snapshots.
Change how aggregate is retrieved
Logic behind the get_aggregate should be changed as follow:
fetch snapshot with greatest version number for particular aggregate (or all events if there are no snapshot yet)
fetch all events with version greater than that from the snapshot
Store snapshots
Add Snapshot model
Add Storage.create_snapshot method
Create snapshot "every now and then" (i.e. every 20 events - this variable should be controlled somehow)
The text was updated successfully, but these errors were encountered:
Currently
Repository.get_aggregate
method is not very efficient - it fetches all events that were used to create an aggregate. In order not to do that we want to introduce snapshots.Change how aggregate is retrieved
Logic behind the
get_aggregate
should be changed as follow:Store snapshots
Storage.create_snapshot
methodThe text was updated successfully, but these errors were encountered: