Limiting Direct Access to Holons #184
evomimic
started this conversation in
Design Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
This discussion explores mediating access to Holons through HolonReferences as much as possible. The focus on this discussion is primarily on clean definition of the Reference layer and Shared Objects layer of the architecture.
Assumptions:
HolonReference
(implementingHolonReadable
)Nursery
(a.k.a.,StagingArea
) is ping-ponged, staged holons can be accessed viaStagedReference
on both client and guest-sidesHolonsCache
is NOT ping-ponged (because access requirements are different for client and guest)HolonReference
,SmartReference
andStagedReference
abstractions are portable and defined on both client and guest.Objects Requiring Direct Access to Underlying Holon
The ONLY objects requiring direct access to Holons are:
StagedReference
implementation needs direct access to staged Holon in order to implementHolonReadable
andHolonWritable
SmartReference
implementation needs direct access to cached Holon In order to implementHolonReadable
Nursery
to/fromStagingArea
needs direct access to staged HolonsHolonIds
(on demand)Traits can be used to partition functionality and avoid circular dependencies. Both traits and object definitions should reinforce the clear separation of architectural layers.
Reference Layer
An
references_api
module could define the following:HolonReadable
trait -- offering read-only methods on individual HolonReferencesHolonWritable
trait -- offering mutating methods on individual HolonReferencesStateMobility
trait -- to supporting extracting Nursery state and HolonSpace HolonReference (ONLY) to ping-pong operationsHolonStagingBehavior
trait -- to stage new holons and retrieve staged holons by keyHolonLookup
trait -- to get HolonReferences to committed holons by HolonId and by keyCollectionReadable
trait -- offering read-only methods on HolonCollectionsCollectionWritable
trait -- allows HolonReferences to be added and removed from HolonCollectionsHolonsContext
struct -- provides access to HolonSpaceManager and dance state.The Reference Layer is also the home for:
HolonReference
struct that implementsHolonReadable
SmartReference
struct that implementsHolonReadable
StagedReference
struct that implementsHolonReadable
andHolonWritable
HolonCollection
struct that implementsCollectionReadable
andCollectionWritable
HolonSpaceManager
struct that implementsStateMobility
,HolonStagingBehavior
, andHolonLookup
. The HolonSpaceManager also implements the Shared Objects LayerNurseryAccess
andHolonCacheAccess
traits and owns the Shared Objects Layer structs:Nursery
,HolonCacheManager
, andCommitService
Shared Objects Layer
An
shared_objects_api
module could define the following:The shared_objects layer is also the home for:
Implementation Notes:
get_rc_holon
on HolonSpaceManager (obtained from context)get_rc_holon
to its Cache (if LocalId) or the HolonSpaceProxy if ExternalIdget_rc_holon
(this implementation already exists in HolonSpaceManager and just needs to be migrated to HolonCache).Persistence Layer
This layer encapsulates all calls on the Storage Layer. It is the ONLY layer that is allowed to call holochain storage functions. The types exposed by this layer are
HolonNode
EntryType
and theSmartLink
LinkType
. Files in this module cannot refer to types defined in the Shared Objects Layer (which depends on the Persistence Layer). This means they cannot referenceHolon
orHolonError
.Beta Was this translation helpful? Give feedback.
All reactions