sageserpent-open / plutonium

CQRS providing bitemporal object modelling for Java POJOs and Scala too.
MIT License
5 stars 0 forks source link

Scaling - Spike - incremental recording of events - facade implementation take two #36

Closed sageserpent-open closed 7 years ago

sageserpent-open commented 7 years ago

A second attempt at providing an API for incremental recording of events with a simple facade implementation. This will involve a diverging copy of the existing in-memory implementation.

sageserpent-open commented 7 years ago

This has exploded into a lot of work, albeit a sensible overall design has emerged. Rather than get completely overloaded in implementing all the bits and pieces, I will close off this spike and start a new story that is the provision of an in-memory implementation that supports queries that do not require full playback of events each time a scope is constructed. That way, the new design can be filled out, but the new Timeline can be implemented in terms of an adapted form of the existing 'PatchRecorder' that performs full event playback whenever a new timeline instance is created. This will result in the existing poor scaling of successive revision bookings, and will also overload the blob storage with unnecessarily replicated snapshots. It will however get the overall design into a state that it passes the tests, and will serve as springboard to doing a quick optimisation of revision bookings by starting full event playback from the time of the earliest event in the new revision, along with subsequent deduplication of the blob snapshots.