evomimic / map-holons

3 stars 1 forks source link

Let's Make a Nursery! #104

Open evomimic opened 1 month ago

evomimic commented 1 month ago

UNDER CONSTRUCTION

This enhancement introduces a Nursery Trait that unifies the functions related to introducing and and shaping new holons and refactoring CommitManager and StagingArea so they both provide implementations of Nursery.

Current State

- the dances zome defines a StagingArea struct:

pub struct StagingArea { pub staged_holons:Vec, // Contains all holons staged for commit index: BTreeMap<MapString, usize>, // Allows lookup by key to staged holons for which keys are defined }


- Only a couple of the CommitManager's functions relate to _commit_, most are related to managing or operating on its `staged_holons`
- The StagingArea was originally introduced as a simple data structure that allowed the state of staged holons to be pinged back and forth between client and guest. 

## Proposal

- [ ] Create a new nursery.rs file  within the holons zome that includes:
- [ ] Nursery Trait
     - [ ]