Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell Info design for multi instance use on the client #161

Open
nphias opened this issue Jan 13, 2023 · 8 comments · Fixed by holochain/holochain#1763
Open

Cell Info design for multi instance use on the client #161

nphias opened this issue Jan 13, 2023 · 8 comments · Fixed by holochain/holochain#1763
Assignees
Labels
needs clarification Reproduction or exact bug definition needed

Comments

@nphias
Copy link

nphias commented Jan 13, 2023

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

@jost-s
Copy link
Contributor

jost-s commented Jan 15, 2023

InstalledCell is being replaced by CellInfo. To be released this coming week.

@jost-s
Copy link
Contributor

jost-s commented Jan 20, 2023

This is going to be made available in the client tomorrow.

@jost-s
Copy link
Contributor

jost-s commented Jan 20, 2023

@nphias
Copy link
Author

nphias commented Jan 20, 2023

/// 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,
}

@nphias nphias changed the title installedCell lacks a name (or type) field? Cell Info design for multi instance use on the client Jan 20, 2023
@nphias
Copy link
Author

nphias commented Jan 20, 2023

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

@jost-s
Copy link
Contributor

jost-s commented Jan 20, 2023

@maackle @abe-njama FYI, up for discussion (where?)

@maackle
Copy link
Collaborator

maackle commented Jan 24, 2024

I just saw that GH auto-closed this issue in my name but I have no idea how that happened. I'll reopen since there is still potential for discussion.

@maackle maackle reopened this Jan 24, 2024
@mattyg
Copy link
Member

mattyg commented Nov 12, 2024

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

I created an issue to track this in the holochain repo holochain/holochain#4453 -- I believe it captures the intent of this request but feel free to add any more context or clarification there - or let me know if I'm way off base. @nphias

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?

Yes if you want to have two cell instances of the same DNA, you could clone the provisioned cell. Alternatively I believe you could include the DNA twice in your app manifest with different role names and properties. Does that fulfill your requirements? @nphias

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,
}

I'm not sure I understand this. Is this underlying issue that it is not ergonomic to match cells by the role of their source cell?

Would this be addressed by having a consistent identifier for all clones that were cloned from the same cell? For example, by including the original role name in all cells, and then including the clone_index as a separate field just in clones? If so I believe its covered by holochain/holochain#3219 -- does that make sense @nphias or is this a distinct issue?

@mattyg mattyg self-assigned this Nov 12, 2024
@mattyg mattyg added the needs clarification Reproduction or exact bug definition needed label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs clarification Reproduction or exact bug definition needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants