The Internet Vision of Holochain's Peer-to-Peer Web Applications
Author: Holochain
Compiled by: ChainCatcher
When we first started this project, we shared our vision of a peer-to-peer web application that would enable users to guide their own online experiences. We connected with thousands of people who were also inspired by the possibility of eliminating the built-in centralized power in infrastructure so that humanity could greatly expand its potential for creation and collaboration.
The launch of Elemental Chat during our Alpha testing certainly does not complete all this work. But it is a real step towards fulfilling that promise. Elemental Chat running on HoloPorts has no central database. Each person running the application signs their messages to their own chain and then automatically publishes them to a shared database hosted by other users of the application. This is the beginning of something. It is not just a seed of an idea. The deep roots of Holochain and Holo have fully sprouted and are now growing and thriving.
This recent rapid growth is evidenced in the timeline of events leading to the release of the current version.
The pace of our development since the launch of Holochain RSM indicates how quickly and easily others can bring new P2P applications to market. So, let’s dive into what Elemental Chat is, what it is not, and how it moves us forward.
Elemental Chat is merely a proof of concept application. What we mean is that it does not have all the features of popular messaging applications on the market today. You can create channels and 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 their browsers.
What you cannot do is limit the channels you see or follow, or send messages to just one person. You also cannot have reply threads; in fact, the user interface does not even showcase all the best features in Holochain. In this super basic test application, you can see everything, but it is almost indistinguishable, which means the user experience is less than satisfactory.
Elemental Chat intentionally does not include these excellent user-friendly features. We wanted a simple application with just a few functions to avoid spending too much time testing and debugging the chat application, while our focus is actually on building the underlying infrastructure that includes the Holo distributed hosting platform.
Paul explained well in the Dev Pulse on December 24 some of the reasons we chose Elemental Chat as the first distributed application release for Holo:
“First, we thought testing would be more fun; second, we knew it would push all the features of Holochain in a way that would show any errors; third, we wanted something that could tell us where the performance bottlenecks were.”
But another important reason for us is that the chat functionality illustrates the differences and potential of Holochain compared to blockchain.
Releasing a chat application—even a toy application like Elemental Chat—clearly indicates that Holochain is designed to build a class of applications that could never truly run on a blockchain. Think about applications that are critical for basic functionalities like scalability, fast transactions, or interactions. The vast majority of web applications we use in our lives do not require global consensus from a blockchain at all, and trying to force them into a consensus model could actually hinder them. Chat shows us this difference in the most natural way.
Imagine attending a party with 25 to 100 of your closest friends, where people are sitting in small groups chatting around the room. Many different conversations are happening simultaneously in the room. You might be able to hear parts of many of them, but you might be more focused on one or two than others. Everyone in the room is likely doing the same thing—that is, they are listening to the conversations they are engaged in—rather than the general buzz of conversations happening throughout the space. Because of this, everyone has their own unique experience of what is being said. I doubt anyone at that party would say there is a problem with how people communicate. In fact—this very normal face-to-face, multi-sensory type of setting is exactly what many of us have missed over the 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) needs to process it and clarify what was said to others and record it and ensure everyone understands it in exactly the same way. The first person (Alice) cannot say anything else until everyone in the room has processed her first statement. Some kind of order needs to be created for who is speaking, as each statement needs to be placed in the correct order and shared with every other person in the room for the conversation to be considered valid.
This sounds ridiculous—because it is. Consensus models have little to do with many human needs, and in terms of collaboration, they are often extremely inefficient. Blockchains have proven inefficiencies in many ways, but perhaps the most obvious is the extreme energy consumption and waste generated to power the network.
In fact, many applications only need to do two things really well: simplify coordination and achieve eventual consistency.
Now let’s look at how Holochain’s natural pattern approach simulates the same party. When you talk to a small group of friends, your messages are saved to your local chain. Friends participating in your conversation receive a signal immediately and hear your message. Once someone’s message is saved to their local chain, it is also saved to the group database or DHT. Moments later, your shared database portion will update with messages from other conversations happening elsewhere at the party—eventually, you can access all the gossip from the party. Sounds like a great and memorable party!
Using natural patterns to simulate digital interactions is what sets Holochain apart—this is why Holochain enables applications to truly scale and why it is an ideal choice for collaboration. Holochain ensures agency for each user without imposing a single viewpoint.
So we can see why Holochain is so well-suited for modeling chat applications, but many people are looking forward to our release of the application that will run Holo’s cryptocurrency HoloFuel. People often ask, “Without consensus, how does HoloFuel work?”
Imagine a group of parents in a community creating a babysitting time exchange system and having a phone application where I can log three hours of babysitting time for you, and when I do, my babysitting balance decreases by three hours. Some people provide more babysitting services than they receive, and they will show a positive balance of hours. Others receive more babysitting than they provide, and their working hours will show a negative balance.
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 Alice’s and Bob’s accounts will change from this transaction, and they are the only authorities who can change their accounts. They can sign the same transaction on their respective chains (one transaction shows Alice spending credits while Bob receives credits), and when they publish it to the rest of the network, others on the network will validate the transaction to ensure it follows the shared protocol. It’s basically that simple. (Actually, it’s not that simple, but to better understand how Holochain works, watch this 12-minute video.)
This currency model is more like peer-to-peer value accounting, where your chain keeps your transaction history. Not everyone is trading babysitting time, but when you replace babysitting with distributed cloud hosting as a service, the principle of the model is exactly the same, and it applies to food, energy, and many other applications.
The release of Elemental Chat for hosts is an important step forward in this journey. However, for us, the next infrastructure milestone is what we are going to do. At that point, non-hosts (regular network users) will truly experience creating accounts and logging into Elemental Chat hosted on the host’s HoloPort. We have already begun the testing cycle for that milestone.
In the coming weeks, you can expect us to support more and more hosts connecting their ports to the Holo network and starting to chat in Elemental Chat. We will assess the good and bad of performance scaling and listen to people’s thoughts on it.
We are likely to make some minor changes to the chat application as we prepare for a broader release to network users. We will continue to improve the testing framework so that hosted applications can use it more widely, not just the applications we directly install on HPOS.
As we shared in the previous article, we are also moving forward on several other milestones after Hosted Elemental Chat. We might even release the host console work simultaneously, but we have not committed to that yet. After that, we will focus on the HoloFuel application.
However, what is not visible from these charts is that work on Holochain continues to evolve, which is crucial for Holo and community application developers building applications in our ecosystem.
Holochain has been steadily improving the usability of the framework. When we first released RSM, although it was a huge technical improvement, we had not yet started releasing to crates, nor had we stabilized the Holochain Development Kit (HDK). We have recently made a lot of significant changes to the HDK, and it should now be quite stable. We have also “fixed” Holochain to make it easier to install and ensure the same installation among collaborators. You can learn about the latest test versions at Holochain.love.
In the coming weeks, Holochain will see more improvements. After the database engine transition, we will implement sharding and other key network scaling features before turning to more security and identity management features. All of this is essential groundwork for the Holo Beta release.
So I will shout out once again to everyone who supports this amazing work. Thank you to the development team for bringing this release to the finish line. Thank you to the community-facing team for supporting hosts connecting to the network. Thank you to all the developers in the community who are developing new features and demonstrating how natural patterns work in Holochain. Thank you to all the administrators and volunteers who share knowledge with newcomers to the project.












