New Parallel Staging is Great for hApp Developers

Leadership & Org Update 14

In an open-source project, it’s pretty cool when we see people in our community grok some of the big steps we take by peeking into GitHub before we’ve even mentioned it anywhere else. Plus, it gives us an excuse to talk about it!

It’s good to know that we’re not the only ones who see the immediate value in our new simulated network approach. But we’ll get to that in just a bit.

In our Leadership & Org Update two weeks ago we outlined four challenges and opportunities we’ve experienced in building distributed networking for Holochain.

Two of those four involve large scale testing and staging. Various disciplines approach these challenges in different ways. For example, multi-stage rockets use both tandem staging, where each engine runs one after the other, and also parallel staging, where two or more engines are active at the same time. Until recently, we’ve been largely operating in the tandem paradigm, but in the past few weeks, we’ve created new tooling that moves our networking development into parallel staging.

Our production network solution is called lib3h. We’ve made solid progress over the last few months with this fully decentralized, scalable network design. However, lib3h is complex and has multiple components that must work together including: 1) node discovery, 2) NAT traversal, 3) gossip, and 4) DHT sharding. And we want to get Holochain running for devs in the world now!

So rather than stoically continuing with tandem staging of lib3, by switching to parallel staging alongside a new network module we can deliver great functionality to hApp developers now. Simultaneously we can build our testing, knowledge, and understanding of lib3h’s intricacies, and even switch over easily the moment we’re ready.

Better, debugging, troubleshooting, and testing means. . .

Introducing sim1h

We call our new network module sim1h (sim for simulation). We created it to meet several immediate needs of Holochain app (hApps) developers in the community as well as our internal Holo devs. The main benefit that sim1h provides is that it allows us to simulate a peer-to-peer (p2p) network on one centralized device. This means all network communication is represented in a single memory space giving developers an omniscient view for debugging, troubleshooting, and running test networks with real agents. In other words, developers can now see everything that goes on in their agent-centric distributed application test network! Pretty cool, eh?

This visibility creates lots of short term advantages for Holochain and hApp developers:

A full working dev stack

The ability to test, diagnose, and debug while running on many remote nodes and with real agents

The potential to get real user feedback while running on many networked nodes

Sim1h also creates a new possibility with the parallel staged approach to test and then replace (as necessary) specific portions of its simulated p2p network with the actual ones from lib3h as soon as testing on each component is done. And because the sim1h centralized network solution has been written against the same interface as lib3h, it can immediately, and seamlessly, integrate with our Holochain core engine. This lets us keep testing our production, fully decentralized network solution without impacting our Closed Alpha Testnet. Then, when lib3h is ready, we can easily switch over to it as the peer-to-peer networking solution!

Why is this awesome?

It’s great for all the reasons above but put simply — it feels like a win-win.

Sim1h makes it easier for hApp developers to build, run, test, and get user feedback on their Holochain applications right now. Sim1h helps us in the development and debugging of Holochain’s lib3h networking while allowing for parallel staging of its functionality.

In the next few days we’ll publish more details for developers about how to test your hApps on our new Holochain blog. We’re looking forward to sharing beyond that — and hearing from you all about what you’re building!

Jamison Day

Eric Harris-Braun

Nicolas Luck