-
Notifications
You must be signed in to change notification settings - Fork 1
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
WiP restructure of Space_Managers and responsibility of cache,stage and commit #171
Conversation
outstanding issues: further work:
|
5027c76
to
d46a1d4
Compare
Dependencies:
Suggestion:
Struct Definitions
There are few things I requested in the Issue commentary that I notice you weren't implemented.
Simplifications
Minor Style Concerns:
|
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.
There remains some areas to be improved, but no showstopper issues in this code and all tests pass. I'm approving this PR.
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 code in staged_reference.rs module violates the encapsulation of the staged holons within the Nursery... don't expose the staged holons, just ask the SpaceManager for the holon by index.
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.
If we are going to introduce a StagedIndex type (as is currently being done in the staged_reference.rs module), it should be defined in the module that actually owns the keyed_index... i.e., it should be defined in the nursery.rs module and the definition of the Nursery's keyed_index should use that type.
The start of the work to re-architect around HolonSpaceManagers
in general managers maintain stateful data and service provide transient / stateless functions
HolonSpaceManagers
The Nursery is a manager internally controlled by the SpaceManager that takes care of basic staging logic
The following services assist the SpaceManager:
Functionality of the deprecated CommitManager and CacheManager have been moved to the SpaceManager and CommitService (they still remain as unincluded modules for reference from this PR)
A Local SpaceManger is always created by the initialisation process along with its respective LocalSpace holon.
A reference to the Local SpaceManager is stored in the context so it can be accessed anyway from the context.
The space holon and space_ref belong to the HolonSpaceManager but are sourced from the session and serialised to the session via spacemanager methods
we might assume that related holons could be in other spaces so the context is needed to differenctiate.
We can also determine which space a holon belongs to during the commit process because a “parent” space property is a field in the Holon struct.