Cell Info design for multi instance use on the client
nphias opened this issue · 7 comments
export type InstalledCell = { cell_id: CellId; role_name: RoleName; };
export type InstalledCell = { cell_id: CellId; cell_name: CellName; role_name: RoleName; };
the yaml files appear to have "name" and "role" fields which have two different intentions
If i have two cell clones it would be nice to have a name field which is common (ie the cell_name) and another which has meaning for that instance assuming "role" could be used. One can then display a list of cells of the same type in the UI distinguisable by that instance field
InstalledCell
is being replaced by CellInfo
. To be released this coming week.
This is going to be made available in the client tomorrow.
These are the exact fields that will be returned for clone cells: https://github.com/holochain/holochain/blob/b60c64ec375f88670a53af11edd160047f37eff7/crates/holochain_conductor_api/src/app_interface.rs#L257-L272
/// Provisioned cell, a cell instantiated from a DNA on app installation.
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct ProvisionedCell {
pub cell_id: CellId,
pub dna_modifiers: DnaModifiers,
pub name: String,
}
/// Cloned cell that was created from a provisioned cell at runtime.
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct ClonedCell {
pub cell_id: CellId,
pub clone_id: CloneId,
pub original_dna_hash: DnaHash,
pub dna_modifiers: DnaModifiers,
pub name: String,
pub enabled: bool,
}
ok i see in the docs clone_id maps to role.. what if i want to run two instances of a provisioned cell, one as a user and the other as an admin (different agent keys)? would that mean making a clone first?
Why not make a more consistent structure, so on the front end devs can create stores and receptor services per cell instance without having to worry about the cell type? ie [cell_name:cell_instance]
ProvisionedCell {
pub cell_id: CellId,
pub dna_modifiers: DnaModifiers,
pub name: String,
pub instance: String,
}
ClonedCell {
pub cell_id: CellId,
pub original_dna_hash: DnaHash,
pub dna_modifiers: DnaModifiers,
pub name: String,
pub instance: String,
pub enabled: bool,
}
another issue / feature request .. which i think makes sense to add here, Is that it would be nice to have the cell_api
as a cellInfo property.. then devs can programatically infer that the cells functions ( RECEPTOR API ) match those functions in their Receptor service classes . Receptors span multiple zomes and are congruent with a design centered on a Cell based biomemetic architecture
@maackle @abe-njama FYI, up for discussion (where?)