-
Notifications
You must be signed in to change notification settings - Fork 1
MAP Descriptors as Holons
We began the prototype development with MAP Descriptors being a separate Github Repo: map-descriptors2. That repo uses holochain to store descriptors, with EntryTypes for each of the various kinds of descriptors. As we've turned to MAP Holons development and begun to flesh out its basic structure (HolonNodes and SmartLinks), there naturally arose questions about whether this simple structure would, in fact, be capable of reasonably representing real-world schemas. This is an important question, because the Uniform API will only support Holons with their properties, relationships and dances as its abstractions.
This gave rise to the idea of attempting to represent MAP Descriptors themselves as Holons. The set of MAP Descriptors Wiki Pages offered here represent an attempt at re-defining MAP Descriptors as Holons within the structuring primitives provided by MAP Holons. The intent is to follow a minimalist approach to MAP Holons -- i.e., being very conservative about adding abstractions to MAP Holons, only adding them when truly necessary.
- At the IntegrityZome level, the only EntryType is HolonNode and the only LinkType is SmartLink
- The MAP Holons Coordinator Zome provides additional, in-memory, abstractions for convenience, but all of these abstractions are mapped to HolonNodes and SmartLinks at the storage layer.
- HolonNodes have a PropertyMap that maps PropertyNames to PropertyValues.
- PropertyValues can only draw from a small set of ValueTypes: Boolean, Integer, String, Enum and ValueArrays whose elements are values of any one of those ValueTypes. Notice structs and tuples are NOT supported -- i.e., structs must be represented as holons, not values.
- Enums do NOT have associated data... i.e., enums offer a list of variants, but unlike Rust, variants cannot, themselves have associated data.
- Holons are linked via HolonRelationships that are stored in holochain as links using the LinkType: SmartLink
- The semantics of a HolonRelationship (as described in its RelationshipDescriptor) determine its in-memory (i.e., Coordinator Zome-level) representation. Specifically, relationship targets with a max_cardinality of 1 are represented as HolonReferences. Those with a max_cardinality > 1 are represented as SmartCollections.
The following pages present the definition of each of the different MAP Descriptor types within the constraints of the above capabilities. Certain graphical conventions have been adopted to better convey semantics in these diagrams. The following legend helps explain those semantics:
Every datatype has a single defining diagram and multiple referencing diagrams. The defining diagram is the source of truth for the definition of datatype and shows the complete specification for that type (e.g., all of the properties and relationships for a Holon Type, all of the properties and variants for an enum). Referencing diagrams depict the referenced type in a grey box that contains only the name of that type.