"dna"

In the beginning everything was quite simple. The conductor considered a hApp as one DNA consisting of a number of zomes, and one static web application. The conductor would host both the holochain network and the local webapp. Then came the separation of “client” and “server”. This allowed for a cleaner and more production-friendly grouping of responsibilities. Holochain backend, ambiguous front-end. But this opened the door to construing a hApp as containing one or more DNAs. When it was found that multiple DNAs provided greater possibilities to hApps, it was codified as an official practice.

But now we find ourselves in a silly situation. A network acting as a single mass may have many different DNAs inside it, rendering the life-based naming scheme moot if not directly hostile to understandability! At this point DNA seems like a very abstract, cumbersome, and pointless notion. But instead of confronting the aging design of Holochain which came from an over-eager prototype, we have doubled-down and created spaghetti code of our concepts.

I believe that a refactoring of Holochain’s high-level concepts could greatly simplify (and improve) its architecture. Whether it would be worth the work to do such a thing is another question entirely.

I would be very happy to know what you think about this conundrum, and whether you’ve thought about it before.

1 Like

Multiple DNAs that work together to provide a common functionality (common in the sense that the user would probably want to consume all the DNAs to make any sense) can be called an ecosystem. For example, in the Facebook ecosystem, you might have a Messenger DNA (which itself is made of multiple zomes) and a generalized SocialConnections DNA, and so on… And any sane user would want to (and have to) consume them all if he/she wishes to make sense of the data (and the services); for instance, you might not be able to have (as per the rules) a Messenger chat-room with someone you aren’t in SocialConnection with…

The reason why the word “ecosystem” hasn’t developed and evolved as much in this community is because there are none (as of now). But so far, I quite love the analogy of cells, membranes, DNAs, zomes, (ecosystems), [agents], and so on…

And if your concern is that in the real world DNAs don’t talk with each other then let me rectify that. They do talk, or more precisely, cells (or little microorganisms) of different DNAs often work together to realize a common goal. For instance, right now at this very moment, in your gut there are millions of different species of microorganisms that work together with each other (and with your native cells) to achieve the common goal of digesting food (and even producing hormones; yup, 90% of hormones are produced in the gut), and the common goal benefits us all. In fact, in your body, there are more foreign organisms than there are cells of your own! That’s mind boggling! And I think that’s partly why we call it “committing suicide” as if it were like “committing a crime”, because that’s what it is: a crime! As doing so (hurting yourself) also hurts all those little organisms who are dependent on us (and whom we have always been dependent upon). [Not advocating veganism here… but thought that was worth mentioning.]
So, yeah, DNAs do chat!

1 Like

One could go about calling an agent a “spirit”, and the conductor a “planet”; as a conductor just hosts/runs the DNA instances (cells), and so does a planet. A planet hosts the cells and the ecosystems. An agent on the other hand is actually a meta-concept (not a concept itself), as it just magically controls the behavior of the cell with respect to other cells (controlled by other agents, often human in nature; haha). But so does a spirit, and a spirit can possess multiple cells/beings at the same time too (note that a spirit is in stark contrast to the soul of the organism in question) [source: the Nag Hammadi texts, for the distinction between the man, the mind, the body, the soul, and the spirit; haha]. Though calling an agent a spirit is a bad idea… Sounds too esoteric… Plus it deviates from the fact that via agents, Holochain is actually implementing an agent-centric system. And calling the conductor a planet is all too ludicrous. And such weird terminology might turn off future developers with a programming background; in fact, the future dev may even refuse to take the whole Holochain thing seriously, just because of such esoteric and funny nomenclature… Let’s stick with the convention where possible. Let’s stick with agents and conductors and UI frontends, and so on…


Another idea: let’s start calling conductors “petri-dishes”. Hahaha!

1 Like

Wow, this turned into esoteric philosophy very quickly. Even if organisms in the real world can be made of two or more organisms with differing DNA, it still doesn’t sit right with me in an intuitive sense. So a single node can function as two or more cells for a single hApp which provides a single experience, and if I understand it correctly the conductor would only be aware of each DNA as siblings, lacking a meaningful grouping of hApp. Just writing it hurts my head! That many concepts in such a confusing arrangement (and with such esoteric naming) is sure to hurt Holochain’s adoption, especially among people who would want to use it as something like e.g. a ruby-on-rails replacement. Nobody wants to learn all that AND get their head around agent-centric computing! They would just go back to client/server. This next example is perhaps going too far for many people on this forum, but why not instead the Holochain Runtime manages Holochain Applications which each manage a number of networks (of which a node can be in any number) and DHTs.

As of now a DNA manages a

  • set of entry types
  • entry validation rules
  • a secure network
  • a DHT

This is an absurd conflation of so many things under a confusing name. Instead of forcing a developer to generate and add a new DNA at runtime to create a temporary DHT, why can’t these concepts just be part of the HDK?

I do see what you are saying, though I’m curious - what is in your mind the difference between dht and network? How would be the DHT part of the hdk, more than it is now?

My understanding of networking is pretty underdeveloped, so perhaps fine-grained control of networks would be of little to no use to a hApp developer. As I understand it, DNAs now encrypt their network traffic with their hash. I just figured some control of network encryption might be useful to a developer. If some number of agents want to communicate data securely with a DHT, it might be enough to create a DHT on the same network, but if they want to be sure nobody else knows they are communicating its my understanding that they may need to create a network for themselves. (And to answer the question about how DHTs would be more a part of the HDK, each node would determine by the hApp rules (DNA if we still want to call it that) which DHTs to participate in)

On an unrelated note, I am typing this in firefox’s private browsing mode as I can no longer log in to this forum normally on my linux installation. I get You can't log in as MightyAlex200 from that IP address. any time I try. Would this be an issue on my end or on the forum’s end?

Hum well okey, just to clarify, in holochain a dna (inert source code) can be instantiated into a cell (app instance) inside a conductor. That cell will be identified by a pair [dna-hash, agent-pub-key] and form part in a dht with other agents running the same dna. There is no other network in holochain apart from these “normal” dht (with some nuance with peer discovery that I don’t think is important here). So, really, DHT = network = group of dna instances.

As far as I know traffic between agents is encrypted using private keys from the agents themselves, not with the DNA hash. So you can communicate with another agent privately in the same dht, no problem. Moreover, in the hdk we now have encryption functions that make it very easy to do cryptographic things.

Each node (conductor) chooses which dhts to participate in by installing that dna, but that can only be done via the admin interface of the conductor, not from inside another app, not yet anyway.

Does this help?

2 Likes

Yeah, if DHT = network then I guess my main issue is that DNAs and DHTs have a 1:1 correspondence. It leads to a whole bunch of mental gymnastics to separate the idea of DNA from what it’s supposed to represent. If DNA code could tell its cell which DHTs to contribute to and which to read from, I think it would solve a lot of the issues I’ve brought up here. If that change was made then I don’t think renaming any of the concepts would bring a whole lot more understanding. I think I came off as a bit too hostile to the current naming-scheme in my posts, I think they’re a good way of getting developers to think about their apps in the agent-centric model, but the current situation with DNAs and DHTs is confusing.

DNA is just a term, perhaps misleading… language just conveys meaning, so whichever logic makes sense to you is perfectly fine. thanks for your interest, and are ahead of the curve already by asking the questions you’re asking.

holoport = piece of the internet (used to live inside central server database)

Happ/membrane/DHT = encrypted private LAN

DNA = source code, rules of the mutual network

Ceptr = smart neural network that allows Happs to function with inside a sentient distributed ecosystem