evomimic / map-holons

3 stars 1 forks source link

Load Schema as Holons #87

Closed evomimic closed 1 month ago

evomimic commented 1 month ago

Now that we have sufficient Holons functionality, we should be ready to implement the schema loader that populates descriptors as holons into the DHT.

Design Choices

Where should schema loading code execute?

We could do the bulk of the various schema element create operations on the client-side or the guest-side.

  1. Client Side Approach: incrementally staging holons and holon relationships through a series of dance requests
  2. Guest-Side Approach: implement aload_schemadance that is requested from the descriptor_tests function, but then do all incremental staging of descriptor holons and relationships on the guest-side -- perhaps even including commit(s).

Since, ultimately, schema evolution is likely to be initiated from the client-side, proving (through testing) that the various description definition dances work favors the client-side approach. However, the signatures of the current descriptor definition functions make heavy use of guest-side data structures (e.g., HolonReference vs. PortableReference). So the guest-side approach would require building another adapter layer (in Rust) to convert to/from client-side and guest-side representations. Of course we will need these types of adapters on the client-side, but they will be written in Typescript.

PROPOSAL: Use a guest-side approach to loading the schema for now. Later we can use Tryorama to test client-side schema evolution operations.

Definer Function Naming

With such an abstract L0 schema, it is easy to get confused about type/instance, type/supertype and type/metatype distinctions. Function naming conventions in the descriptors zome (e.g., define_holon_descriptor) are compounding this confusion by treating type and descriptor as (almost) synonymous. In fact, they are NOT synonymous. A descriptor specifies the characteristics of a type.

PROPOSAL: Change the naming convention for definer functions to reflect the fact that it is the type that is being defined, not a descriptor. Specifically, change functions of the form define_xxx_descriptor to define_xxx_type.

.

evomimic commented 1 month ago

This issue was closed to merge the changes made on this branch in order to tee up some additional work.

The LOAD SCHEMA task NOT complete. Only a few descriptors are being created.

Work initiated by this issue will be completed under Issue #112