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 validation of a revision #28

Closed sageserpent-open closed 6 years ago

sageserpent-open commented 8 years ago

This is a prelude to issue #17, and refines issue #24.

Issue #24 provides incremental recording of events, but the act of making a world revision would still take linear time in the number of patches for a world revision, as the identified item scope is populated ab-initio for all items from the beginning of time. This spike brings together issue #26 and issue #27, adding in new functionality that works out what items would be affected by a revision and thus what patches need to be replayed to verify the correctness of a revision.

sageserpent-open commented 8 years ago

For now, this spike will consider all patches that could have a bearing on future history via an item to force the recalculation of all downstream patches, including those for items that transitively reference the items whose patches were changed in the revision. IOW, there is no optimisation of the propagation of state updates; that can wait for later.

sageserpent-open commented 8 years ago

Need to do a sub-spike - namely refactoring of the Redis implementation to tidy it up, optimize the back and forth traffic between the client process and Redis and offload more work on to Redis. This will take place on a sub-branch 'refactoringOfRedisImplementation'.

sageserpent-open commented 8 years ago

Task: Separate out the code in the two implementations that actually mutates the data structures away from the part that does the validation. Use this excised code to book in the revision in a throwaway experimental world, and if that pans out, use the same excised code to make the booking in the original parent world (which may itself by experimental).

sageserpent-open commented 6 years ago

This is no longer relevant, as the 'Timeline' abstraction is already using a pure functional approach, so doesn't need to use an experimental world to achieve this (in fact it's done the other way round - experimental worlds leverage timelines to achieve independence from their parent worlds).

I'm cancelling this.