Apparently there’s some political thing happening just south of me, so I recognise that your attention might be divided. So I want to thank you for showing up and reading this article. (By the way, I think cryptographic data integrity combined with a digital immune system would go a long way toward reducing electoral fraud. Just sayin’.)
With Holochain RSM rapidly maturing and Holochain Redux in maintenance mode, I think it’s high time to start migrating your app. In this issue I talk about the why and the how. There’s also a small update about the status of the HoloPort Nano at the end.
- Why upgrade to Holochain RSM? A performance comparison
- Resources for installing Holochain RSM and migrating your app
- Quick HoloPort Nano update: test units delivered!
Why upgrade to Holochain RSM? A performance comparison
I’ve written a piece that looks into the migration experience of RedGrid, one of the more well-known projects building on Holochain. The results are pretty exciting—a roughly 15,000× performance improvement over Redux, as I reported last month. I don’t want to steal too much attention from that article, but here are a few details.
The test called for a benchmark of the ‘transactional energy market’ (TEM) software that RedGrid is developing for Monash University’s Net Zero initiative. In this app, an energy consumer is able to ask energy producers to bid to supply electricity for a number of future time slots. Because any entity can be both consumer and producer in the distributed grid of the future (think homes with solar roofs), the application called for massive parallel communication and processing. Naturally, blockchain wasn’t even on the list of options.
In this specific benchmark, the only thing being tested was a single consumer node’s ability to keep up with a flood of bids coming from 29 producers, as measured by write ops per second on the consumer’s chain. This was to be a basic but decent test of throughput and latency, both important metrics for data-heavy, high-frequency energy market exchanges.
The initial benchmark, run on Holochain Redux, measured a mere single write op per three minutes. After migrating to Holochain RSM, the market node was able to sustain 87 write ops per second—a 15,000× increase!
I noticed that the consumer node’s CPU and RAM weren’t maxing out, so I asked the RedGrid team why they didn’t push Holochain harder. They answered that they hit a bug that caused the consumer node to crash. I got word this morning that the Holochain core dev team has found a fix for the bug and successfully tested it with 500 write ops per second. I predict that once this bugfix lands in RedGrid’s hands, they’ll see a further 5× improvement at the least, which means RSM can write entries almost 40,000× faster than Redux.
If that isn’t reason enough to migrate, RedGrid’s dev team managed to shrink their codebase by about half, and they say that it’s more maintainable as a consequence.
I’m super stoked to see such a dramatic improvement. The core dev team took a huge risk when they considered Art’s suggestion to rewrite Holochain from scratch, but it paid off… tens of thousands of times over.
Resources for installing Holochain RSM and migrating your app
So! Now that you’re all eager to update your app to take advantage of all this performance (or ready to give Holochain another try if you found it lacking in the past), it’s time to get it installed and start migrating your app.
We’re still using Holonix, our nix environment, to distribute binaries and tools. You won’t find RSM in the ‘blessed’ release though; it’s in a custom configuration. That means you’ll need to use this slightly longer install procedure:
- Clone the holochain repo.
𝚐𝚒𝚝 𝚌𝚕𝚘𝚗𝚎 𝚑𝚝𝚝𝚙𝚜://𝚐𝚒𝚝𝚑𝚞𝚋.𝚌𝚘𝚖/𝚑𝚘𝚕𝚘𝚌𝚑𝚊𝚒𝚗/𝚑𝚘𝚕𝚘𝚌𝚑𝚊𝚒𝚗
2. Enter the nix shell.
3. The RSM binaries aren’t built and installed yet; install them.
You can read more about how to get started with the dev tools in the repo’s README.
Once you’ve got that all set up, it’s time to start migrating your app. Read this Holochain RSM migration guide first; it’s written by developers who are actively working on hApps and teaching others about RSM. We hope this will jump-start your work.
PLEASE NOTE: This migration guide is a living document and will change as RSM matures. It’s probably the most complete sources of information on writing apps for RSM right now, along with the HDK docs (they’re not online yet, but you can build them yourself). Eventually we want to retire this guide, but not before we have some solid documentation to replace it. If you discover mistakes or missing pieces of information, please submit a pull request against the Holochain Open Dev Blog repo.
The developer docs site also has a list of RSM resources you might find handy in your migration efforts.
Quick HoloPort Nano update: test units delivered!
The first of the HoloPort Nano test units have arrived in team members’ mailboxes, and we expect all units will arrive by the first week of November. I’ve seen lots of energy being put into getting Holochain RSM integrated into the HoloPort’s OS, and I imagine that by the time the Nanos are shipped to the world, RSM will have fully leapfrogged Redux. If I’m right, this will be good news—as you’ve witnessed in this article, RSM will be critical for good hApp performance on the Nano’s lean hardware. And that means more hosting capacity, which means more potential earnings for you!
- Holochain RSM: available, no version numbers yet
- Holochain Redux: 0.0.52-alpha2 | Changelog
- Holonix: 0.0.85 | Changelog
- Tryorama RSM: 0.3.4
- Tryorama Redux: 0.3.4 (blessed)
- hc-happ-scaffold: 0.1.2 (blessed) | Project
- Holoscape: 0.0.9-alpha (contains Holochain Core 0.0.47-alpha1) | Download
Blessed (available via https://holochain.love)
- Holonix: 0.0.81
- Holochain Core: 0.0.51-alpha1
- hc-happ-scaffold: 0.1.2