Elemental Chat — The First Holochain P2P App Released for Hosts

When we first began this project, we shared our vision for an Internet of peer-to-peer web applications that would give users the power to direct their own online experiences. We connected with thousands of people also inspired by the possibility of removing centralising powers built into the infrastructure so that humanity might vastly expand its creative and collaborative potential.

The launch of Elemental Chat in our Alpha test certainly doesn’t get all that done. But it is a real step towards realising that promise. Elemental Chat running on HoloPorts has no central database. Each person who is running the app signs their messages to their own chain and then automatically posts them to the shared database that is hosted by the other users of the application. This is the start of something. This isn’t simply the seed of an idea. The deep roots of Holochain and Holo have fully sprouted and are now growing and strengthening.

1_0DbWJiuJXpuVNPhy8iTEdg.png
  • png

This rapid recent growth is demonstrated in the timeline of events that led us to the current release.

15-Sept-2020

We shared publicly about Holochain RSM

15-Oct-2020

We shared our Path to Beta roadmap for Holochain RSM

12-Nov-2020

We shared about the upcoming Networking features for Holochain RSM in the Dev Pulse

27-Nov-2020

We announced also in the Dev Pulse that Networking in RSM had landed

24-Dec-2020

We announced Elemental Chat was released to Pre-release testers

29-Jan-2021

We shared about rewriting automated test tools for RSM in the Dev Pulse

10-Feb-2021

We announced the release of Elemental Chat to Hosts

The speed at which we have been able to move since the launch of Holochain RSM is indicative of how quickly and easily others will also be able to bring new P2P apps to market. So let’s dig into what Elemental Chat is, what it is not and what it lets us do moving forward.

Elemental Chat is simply a proof of concept application. What we mean by that is that it doesn’t have all the bells and whistles of popular messaging apps on the market today. You can create channels and you can send messages. You can also query the application network to see how many nodes are connected and how many people have the application open in a browser.

What you can’t do is limit what channels you see or follow, or send messages to only one person. You also can’t have reply threads, and in fact, the UI doesn’t even showcase all of the best features in Holochain. In this super-basic testing app, you see everything and can differentiate little which means a less than ideal user experience.

Elemental Chat Demo - First Fully P2P Chat App (POC) on Holochain (RSM)

None of those wonderful user-friendly features are included with Elemental Chat, and that is intentional. We wanted an uncomplicated app with only a few features to avoid spending too much of our time testing and debugging a chat application, when our focus is really to build the underlying infrastructure that comprises the Holo distributed hosting platform.

A chat app differentiates Holochain from blockchain

Paul explained a few of the reasons why we chose Elemental Chat to release as the first distributed app for Holo quite nicely in the December 24 Dev Pulse:

“First, we thought it would be more fun to test; second, we knew it would push against all of Holochain’s capabilities in ways that would show up any bugs; and third, we wanted something that would show us where the performance bottlenecks were.”

But another important reason for us is because chat functionality illustrates the difference and potential of Holochain as compared to blockchain.

Releasing a chat app — even a toy app like Elemental Chat — demonstrates unequivocally that Holochain is designed for building classes of applications that could never really work on a blockchain. Think about apps where things like scalability, and speedy transactions or interactions are crucial for basic functionality. The vast majority of web apps that we use in our lives simply do not require the global consensus of a blockchain and in fact could be hampered if we try to force them into consensus models. Chat exemplifies this difference to us in the most natural of ways.

Imagine being at a party with 25 to 100 of your closest friends with people in small groups around a room chatting. Many different conversations are happening in the room simultaneously. You might be able to hear parts of many of them, but you are likely paying attention to one or two of them more than others. Each other person in the room is most likely doing the same — that is they are listening to the conversation they are having — not to the general humm of conversation in the entire space. Because of that, each person has their own unique experience of what is being said. I doubt anyone at that party would say there was something wrong with the way people were communicating. In fact — that very normal in-person multi-sensory type of setting is exactly what many of us have been missing this past year due to the pandemic.

So let’s talk about how a typical blockchain might try to model the communication at that party. One person (Alice) might say something. Another person (Bob) would need to process it and clarify to everyone else what was said and would record it and ensure that each other person understood it the exact same way. The first person (Alice) could not say something again until the first thing she said was processed by every person in the room. Some sort of order would need to be created for who was speaking because each statement would need to get placed in the correct order and shared with every other person in the room for the conversation to be deemed valid.

This sounds ludicrous — because it is. Consensus models are irrelevant for many human needs and when it comes to collaboration they are often extremely inefficient. With blockchains that inefficiency is evidenced in multiple ways but perhaps most explicitly by the extreme consumption of energy and creation of waste used to power the networks.

The reality is many applications only need to do two things really well: enable ease of coordination and reach eventual consistency.

Let’s take a look now at how Holochain’s natural patterns approach would model that same party. As you speak with a small subset of your friends, your messages are saved to your local chain. Your friends that are participating in your conversation would receive an immediate signal and hear your message. After someone’s message is saved to their local chain it is also saved to the group database or DHT. After a short while, your part of the shared database would get updated with messages from other conversations happening elsewhere in the party — and eventually you’d have access to all the gossip messages from the party. Sounds like a great and memorable party!

The use of natural patterns to model digital interaction is something that makes Holochain different — it’s why Holochain enables applications that can truly scale and why it’s ideal for collaboration. Holochain ensures agency for each user but does not require imposing a singular perspective.

How does Holochain work for currencies?

So we can see why Holochain is great for modeling a chat app, but many were expecting us to release the app that will run Holo’s cryptocurrency HoloFuel. People often ask “How can HoloFuel work without consensus?”

Imagine a bunch of parents in a community create a babysitting time swap system and have a phone app where I can credit you for three hours of babysitting, and my babysitting balance goes down by three hours when I do. Some people have provided more babysitting than they’ve received and they’d show positive balances of hours. Other folks who have received more babysitting than they’ve provided, would have a negative balance of hours.

If Alice needs to transfer some credits to Bob, do we really need global consensus? Do we need to know the state of every account in the system? No. Only Bob’s and Alice’s accounts are changing from this transaction, and they are the only authorities to make changes to their accounts. They can sign a single identical transaction to each of their chains (a transaction that shows Alice spending credits and Bob receiving them), and when they publish it to the rest of the network, others on the network will validate the transaction to make sure it follows the shared agreements. It is basically that simple. (Well it’s not quite that simple, but for a better understanding of how Holochain works, check out this twelve minute video.)

This model for currency is more like peer-to-peer accounting of value, where your chain holds the history of your transactions. Not everyone is transacting in hours of babysitting but the principles of the model work exactly the same way when you replace babysitting with distributed cloud hosting as the service, and it will work that way for food, energy, and many other applications as well.

What’s Next

The release of Elemental Chat for hosts is an important step forward on the journey. For us though, the next infrastructure milestone is the one we’ll be doing backflips about. That is when non-hosts — regular web users — will actually get the experience of creating an account and logging into Elemental Chat that is hosted on a hosts’ HoloPort. We are already beginning the testing cycle for that milestone.

0_XD8PuQD7sLiEwoq8.jpeg
  • jpeg

In the coming weeks, you can count on us to support more and more hosts to connect their ports to the Holo network and to begin chatting in Elemental Chat. We will be assessing how well the performance scales and listening to what folks have to say about it.

We will most likely make a few small changes to the chat app as we prepare for the wider release to web users. We will continue to evolve the testing framework so that it can be used more generally by hosted apps, not just applications we directly install on HPOS.

As we shared in the previous article, we are also moving forward on several of the other milestones that come after Hosted Elemental Chat. We may even be releasing the Host Console work simultaneously, but we are not promising that yet. After that, we’ll be focusing on the HoloFuel application.

0_5KyCn66OncyZJarP.jpeg
  • jpeg

What isn’t visible from these diagrams, however, is the work on Holochain that is continuing to evolve and which is critical for both Holo and community application developers who are building apps in our ecosystem.

Holochain has been steadily improving usability of the framework. When we first announced RSM, though it was a vast improvement technically, we hadn’t started releasing to crates, nor stabilized the Holochain development kit (HDK). We have recently shipped a raft of breaking changes to the HDK which should be fairly stable now. We’ve also ‘nixified’ Holochain to make it easier to install and ensure identical installations among collaborators. You can stay current with the latest tested version via Holochain.love.

In the coming weeks, there will be additional improvements to Holochain. Following the changeover of the database engine, we’ll be implementing sharding and other key network scaling features before we move on to more security and identity management features. All of these are foundations necessary for the Beta release of Holo.

So, I will leave you with yet another shout out to all of those who are supporting this amazing work coming into being. Kudos to the dev teams for bringing this release across the finish line. Kudos to the community-facing teams who are supporting hosts getting connected to the network. Kudos to all the app devs in the community pulling for new features and demonstrating how natural patterns work in Holochain. Kudos to all the admins and volunteers who share their knowledge with newcomers to the project.

In gratitude,

Mary

About Holo

Holo is a distributed cloud hosting marketplace for peer-to-peer apps built on Holochain. We're helping to build a better Web.

Holo is to cloud hosting what Airbnb was to hotels—anyone can become a host by turning their computer into a source of revenue, getting paid in HoloFuel for hosting peer-to-peer applications to the legacy web. By hosting P2P apps, you support a web that empowers your peers and communities.

Contact details

Related topics

Receive Holo news on your RSS reader.

Or subscribe through Atom URL manually