Establishing Tech Stack Foundation and Preparing for Full P2P Networking

Holochain Dev Pulse 06

Summary

We’re still hard at work, but now much of our work is behind the scenes. Our core dev team is laying strong foundations for networking, improving the developer experience, and strengthening the rigor of our code quality assurance.

Highlights

Rust HDK Changes: Simplifying developers’ work New API Features: More tools for developers Networking: Preparing for full P2P communication Code Quality: Increased coverage and loving Rust We’re actively hiring for a DevOps Engineer Success of 2nd DevCamp!

design and engineering

Details

1. Changes to the Rust HDK

There are developers working on hApps every day. From the highly engaged participants of the DevCamps, to our partners and friends in the ecosystem who are building their apps on Holochain, to our own internal hApps and dev teams; all their hard work is giving us feedback on what works and what doesn’t.

We’re committed to making it easy to create a hApp; therefore we’re taking all this information and using it to shape our Rust HDK into a tool that feels comfortable and increases productivity.

In the last week, we’ve removed the need to do a lot of tedious data conversion, allowing developers to focus on what matters. Read more about these breaking changes, as well as a deep dive into how data gets converted as it flows through the app. What this means if you’re a developer is that you’ll no longer have to use `.into()` quite as much; you can just return a `Result` that wraps your data structure instead.

2. New API features: `update_entry()` and `remove_entry()`

We’ve finished work on CRUD (create, read, update, delete), which means that hApps will be able to ‘modify’ data. Because data on a chain or in the DHT is ‘immutable’ — it can never be changed or removed — the update and delete features simply make it easy to mark an item as obsolete and point to a replacement (optional). This feature will be landing soon.

Distributed Hash Table (DHT)

3. Making low-level changes to prepare for full P2P networking

As you may know from our last dev pulse, the 0.0.2 developer preview shipped with a mock networking layer that was useful for creating multi-agent tests. In order to get Holochain ready for the November DevCamp, we hard-coded some single-agent and local networking assumptions into our code. We’re now going through all the flows of data fastidiously, making them aware of the network.

If you’re curious to learn more, here are the most important changes we’re working on:

4. Code quality: Increased test coverage, paying down technical debt, and loving Rust

A lot of our work last week has been the modest, unglamorous, yet absolutely crucial work of improving our confidence in our codebase. Every software project takes on ‘technical debt’, shortcuts and hacks that are necessary in order to reach a milestone.

Because we’re building the foundation for a new way for people to connect on the Internet, we’ve been very intentional and judicious about the tech debt we take on.

As mentioned previously, we needed mock networking in order to make the 2nd DevCamp a success, which introduced a small bit of tech debt so we could make the deadline. We’re currently replacing those shortcuts with code that assumes a real, functioning network.

We’re also organizing ‘code coverage parties’, in which we write tests that exercise every corner of our codebase. Basically, we’re trying to break Holochain before someone else does. Each party brings our test coverage closer to that important 100% mark.

It seems that every few months we hear about another huge vulnerability in some important piece of software that powers half the Internet. All of this software is written by people at the top of their game, people who have been developing mission-critical software since before many of us in the tech scene were in grade school. No matter how rigorous we are, some mistakes escape our scrutiny. Usually these errors are caused by sloppy memory management, which is easy to do even when you’re being careful.

Enter Rust. Rust was born out of a desire to make it nearly impossible to commit memory management errors. If you accidentally do something bad, Rust will slap your hand and tell you to fix your code. We, along with the developers in our community, have found this makes Rust development a bit slow and cantankerous.

The trade-off is that a whole class of security vulnerabilities is eradicated — both in Holochain Core and in your hApp. This ends up saving a lot of time and pain in the long run.

5. We’re hiring!

We are hiring

We’re actively hiring for a DevOps engineer. On a large project, DevOps (maintaining a fully-functional automated pipeline for testing, building, and deployment of a codebase) can become a full-time task. We want to make sure our core devs are focusing on the things at which they excel. If you are skilled at maintaining Travis CI pipeline and are familiar with Rust and NixOS, we invite you to apply!

6. Dev Camp 2 was a success!

The core devs have been doing so much to BUIDL Holochain to make the November DevCamp a success! They worked hard to get this new release out in time for the 2nd DevCamp (Nov 29-Dec 3). The feedback and excitement has been positive from the participants. All who participated were highly engaged! People joined us from all over the world and were excited/nervous/optimistic to be jumping into Holochain Rust! We’re so excited to see them building their skills, digging deep into technical problems, and most importantly, sharing their knowledge with others in the community.

Here’s what an Ethereum expert had to say about our DevCamp:

“Yay I graduated!! The course was amazing, extremely insightful coming from teaching Ethereum to banks and governments around the world. . . and people I can comfortable say Holochain has a huge future!”

Rust eradicates security vulnerabilities in Holochain core and your hApp

Connect with the developer community