Replies: 5 comments 26 replies
-
One idea I had is to change the concept of a "Cell", and to add a new concept of a "LivingCell". A DNA becomes:
A Cell becomes:
A LivingCell becomes:
But that feels a bit off as well, IDK. |
Beta Was this translation helpful? Give feedback.
-
We have a task to come up with a structure for coordinator bundles, which is closely related. It seems that the Conductor architecture must change in a greater way than just internally storing coordinators independently from integrity. It should be reflected in the API too. What about breaking up an app bundle one step further? Right now there are DNA bundles which make up an app bundle. We could have an additional step of bundling coordinators, then bundling it with integrity etc into DNA bundle and then the app bundle. The coordinator bundle would also serve for updating coordinators without affecting DNA. |
Beta Was this translation helpful? Give feedback.
-
There can only be one set of coordinators for a DNA at a time. On installing an app, I need to provide a DNA as well as a coordinator bundle. When the coordinators of a DNA should be updated, the existing ones are replaced, they aren't retained. So whichever set of coordinators is present in the WASM DB for a DNA is the current one. DNA hash can still be used to identify DNA, consisting of integrity and DNA modifiers. And it can also be used to associate a set of coordinators. When you're installing the app or registering a DNA, the DNA hash is used to connect the DNA with the app and also to connect the DNA with the coordinators. Internally the Conductor tracks that connection too. |
Beta Was this translation helpful? Give feedback.
-
I just want to surface the slightly-uncomfortable wider social context of this. We all know holochain has gone through a lot of iteration. Personally seeing this as an outsider, with the first time with 0.1 beta it feels like we are finally starting to see the light at the end of the tunnel. Since holochain is the core dependency of the entire ecosystem, it feels like people can finally get to work on serious planning, raising money, and building on their own applications, because they have a reasonably predictable time-frame for production-readiness. There is still only one organization funding the development of holochain, and getting them to a point of generating revenue is critical for the sustainability of the framework and the viability of the entire ecosystem built upon it. This could became a significant detour of core developers time and attention. The business priorities and financial constraints of Holo need to be at the forefront of any decisions about this. Perhaps it might make sense to keep it as-is for now and get holochain to production-ready 1.0 release, and then do this refactoring as part of 2.0 release? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I have enough context to contribute too much to this, being fairly new to Holochain, but I do have some experience with packaging so here's the way I see this. First, some observations
In a way these are old problems because they are just about distribution. Here's my summary of some different mechanisms for installing software at the OS level. DebianThis is probably one of the simplest approaches. Your package must have a unique name and when you produce new versions you must provide a unique and orderable version. Dependencies are declared as part of the package so that the OS can work out what other changes need to be made to the system in order to perform upgrades of the main package Under the hood the OS care of applying the (potentially relatively complicated) package content to the system. Relate Debian packaging back to HolochainOne of two key things for me is that package has a unique name which is user friendly. Holochain's
The other key thing is the ordering of versions. I'm not attached to semver and ordering that is a topic in its own right. However, from a user point of view (observation 2) it's really not clear when looking at an installed hApp what version it is running. As an end user I would want it to be easy to communicate to a friend/colleage/anybody what version I was running and which of us might need to upgrade to the latest version to be able to communicate in the case of a mismatch. The DevHub app in the Launcher shows its version as part of the name and within the devhub/launcher the hApp versions are surfaced BUT they aren't included in the manifests that I can see (by unpacking with It is worth noting that the maintainers are recommending tooling for managing patching. I've linked one of two recommendations. Holochain already has tooling in Windows (MSI)(I'm sorry 😃) I'm not sure anybody, including Microsoft is entirely happy with the MSI system but it does have some useful parallels to what holochain is doing so I think it's useful. An MSI installer is based around the idea of features and components. A feature is as you'd expect, it's an independently installable part of an application. The components are the 'things' that make up a feature. These may be binaries, config files or whatever else is needed for that feature to operate. A component is identified by a unique ID that the distributor must specify. The MSI system then puts a lot of onus on the distributor to decide unique identifiers. You have a product code which roughly identifies a minor version (in semver parlance) of a product. You then have a package identifier that uniquely identifies an installer (the actual MSI file). The package identifier is the key part of the versioning and integrity mechanisms because it allows an installer to react to the current state of the system. For example, I provide a It's a very complicated system and it's incredibly hard to get installers right (from experience) BUT it does have the advantage of being expressive and having high integrity. Relate MSI packaging back to HolochainIf you replace globally unqiue ids with hashes then this comes closer to what Holochain is doing. A component relates quite nicely to a DNA. Then a hApp is the installation package but currently does not have a package identifier. The logic for dealing with upgrades moves from being the responsibility of the entity doing the install (windows/holochain) to the end application. That is, installing a patched integrity zome implies changing the DNA hash and it's up to the application what to do with the data. Which actually means they need to know what was previously installed because it's not guaranteed that everyone installs the same patches or versions of an application. This could be done in terms of DNA hashes and probably should be for integrity purposes but it would be an interesting experiement to see what the cognivitive load of coding that would be. I wonder if having a version is easier for the author to understand in this case? Android packagingPossibly the simplest of the 3. An Android application must have a unique application id. This is not visible to the end user but is tied to the application for its lifetime. Every publish of that application must use it and anybody wanting to fork the app to build their own version must choose a new id. Google enforces this through the Play Console which means they can also enforce ownership of app ids. The app version is split into two parts, the version code and the version name. The version code is enforced as an monotonically increasing internal version number on publish. The version name is displayed to the user. That's really it, everything else is packaged into the app bundle. The application itself is responsible for including any database migrations that will be required. As far as I know it's not possible to unpack assets into your app's storage space so it's just up to the application to manage any assets that it has stored in previous versions. Relate Android packaging to HolochainHolochain has already included the idea of a friendly name that different to the emergent version of the application with the The idea of a unique application id I really like. This is not something holochain currently has and I think it would help to tie together the concept of what a hApp is from holochain's point of view. Tie it all together (or at least try!)Given the example of applications installed on a conductor
Let's also say, for completeness, that the user installs two copies of hApp 2 and hApp 3. They join two different networks with the two installations for sharing content with different communities. Entirely contrived and I'm not sure how accurate that is against the design of holochain. But what I'm trying to do is set up a sufficiently complicated example to demonstrate problems without making it more complex than it needs to be 😄 To the end user, they now have 5 upgradable units. The original 3 applications plus two installs with different agent ids. It already feels hard to reason about what should happen during an upgrade of application 3. By taking elements of the sources above I think something like this will work well for upgrades
The concept of DNA stays as it is it can be thought of of it like a Windows component that can be shared by multiple hApps/agents. The concept of a long lived identifier for a stream of upgrades of the same application can be borrowed from Android and the idea of monotonically increasing versions from all 3. I believe this addresses the two observations I opened with because a publisher has a clear set of steps to take. It should also be possible to provide tooling for validating upgrades. |
Beta Was this translation helpful? Give feedback.
-
Since the integrity-coordinator split, I think we have some confusion leftover in the relationship between Zomes & DNAs.
It feels like Coordinator Zomes aren't really "inside" a DNA.
How I see the "essence" of the architecture:
@maackle's personal drawing of the architecture:
I'm afraid of this opening up a can of worms that's best left closed at this stage. But I also feel like getting this right is really important for bringing in new developers to quickly learn the framework (especially after seeing people wrestle with this confusion during the dev training).
I'm not sure if this should be left as is, and we just need better documentation and explanation. Or if we need to adjust some naming or architecture to eliminate the source of confusion.
@maackle said it best:
See this ticket for the bug that prompted this discussion: #2145
Beta Was this translation helpful? Give feedback.
All reactions