Giter Site home page Giter Site logo

Comments (8)

mattyg avatar mattyg commented on May 29, 2024 2

Huh. Very good point.

I don't have a specific use case in mind, more of an implementation preference. I would prefer to treat cell cloning as a "backend" functionality in my apps, where it is kept in the coordinator zomes, rather than the UI.

It definitely makes sense to me that a cell in an app should be free to clone other cells in the same app. Just as it is free to call zomes in cells in the same app.

from holochain.

nphias avatar nphias commented on May 29, 2024 1

cool.. that would be epic.. happy to help

from holochain.

ThetaSinner avatar ThetaSinner commented on May 29, 2024 1

This is in good shape now.

@nphias If you'd like to take a look at the PR and see if you think it'll meet your needs that would be super helpful! Especially the *Input types for calling the new HDK functions and the tests to see how this behaves.

from holochain.

ThetaSinner avatar ThetaSinner commented on May 29, 2024

Just trying to think through how this looks. If you're using clone_only then there won't be a back-end zome to call to create the first clone. So you'd need to create at least one clone to be able to manage more from the backend. Is that expected? Or would you either

  • Want a different cell which is also installed on the conductor to be able to manage clones
  • Not use clone_only so that a cell is provisioned and can be responsible for managing the clones.

If possible I'd like to restrict clone management to within the cell so that you can't just go creating clone cells for another app but if there's a use-case for that I'm happy to have a deeper think about how we keep this reasonably secure. It does sound from the linked discussion like that's the intention.

@mattyg It would be good to hear your use-case for this too before I dive into implementation

from holochain.

ThetaSinner avatar ThetaSinner commented on May 29, 2024

That makes sense to me, unless I hear differently then I'll assume that

  • The clone_only strategy will require a 'bootstrap' clone cell to be created with a client call so that other clones can be managed from it.
  • A creation strategy which provisions an initial cell to be cloned will be needed

The second makes more sense to me really because the effect is the same. So maybe we document that as the option to try first.

That way I can restrict clone management to within an app and if we need to revisit that restriction we can

from holochain.

jost-s avatar jost-s commented on May 29, 2024

Just trying to think through how this looks. If you're using clone_only then there won't be a back-end zome to call to create the first clone.

The conductor API call create_clone doesn't need an existing zome or cell to create a clone. A host fn must be called inside of a zome, that's true, so that way of creating a clone requires an existing cell.

If possible I'd like to restrict clone management to within the cell so that you can't just go creating clone cells for another app but if there's a use-case for that I'm happy to have a deeper think about how we keep this reasonably secure.

The create_clone call takes an app id, and I think that while the app websocket is not restricted to apps, you can't really know "from which app" a client is calling. We have the suggestion to bind app websockets to apps and that would take care of this concern as well.

The clone_only strategy will require a 'bootstrap' clone cell to be created with a client call so that other clones can be managed from it.

Then it's essentially the provisioned strategy. There's very little difference between a clone cell and a provisioned in the way it functions, and only a few differences in how it's created and addressed.

This conversation is turning into discussion about the clone_only strategy, when the OP's suggestion is about host functions to manage clones. I think we can go ahead with the host fn implementation and discuss the provisioning strategy elsewhere.

from holochain.

github-actions avatar github-actions commented on May 29, 2024

This item has been open for 30 days with no activity.

from holochain.

ThetaSinner avatar ThetaSinner commented on May 29, 2024

I've got a few things in progress but I'm going to make a start on this

from holochain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.