Summary

The process of setting up hApps for deployment will be much easier thanks to a new update to `hc run` that will appear in an upcoming release. This update will inform you to use hApp bundles during development. Whether you're rolling your own or deploying to Holoscape or Holo Hosting, your hApp should run the same with minimal need for modifications. This change should eliminate deployment complexities, while making your hApp future-proof for new deployments.

Highlights

Giant leaps toward usability Run hApp bundles for easier app development and deployment

Details

Giant leaps toward usability

We’ve made a lot of progress toward a usable Holochain stack in the past couple of months. There is a lot to talk about—from the discovery and resolution of major blocker bugs to orders-of-magnitude performance gains—these substantial improvements have increased Holochain Core performance since the 0.0.40-alpha1 release. Additionally, details about functional interim networking solutions and other improvements to developer and user experience will have to wait for another edition.

This week, we want to talk about something that ought to change the way you’re developing hApps today! These improvements stabilize Holochain and make it perform sufficiently for usage and further development. Holochain’s progress has enabled us to use Basic and Peer Chat internally with greater speed and an improved user experience. We’ve been experimenting with it recently and it’s exciting to witness these improvements.

Run hApp bundles for easier app development and deployment (#1939)

One of the biggest challenges in developing complex hApps with multiple bridges and DNAs has been making sure deployment works—not just now, but in the future. During our early development phases, the pattern was for hApp developers to do a lot of manual tweaking (like using environment variables or npm scripts) to manage things like instance IDs and RPC interface ports. Essentially this amounted to having to manipulate the whole conductor configuration file. The approach often locked devs into one deployment route. For example, if you started developing in a self-contained environment, there wasn’t a straightforward way to switch to Holoscape or Holo Hosting if and when it was required or desired.

This situation came about for a couple of reasons. First of all, it was not until August that we had ‘hApp bundles’, the specifications that define the components of a fully working hApp. They indicate the DNAs and bridges that comprise the back end, as well as an optional, web-based UI package for the front end. The hApp bundle format lets a developer give their own consistent IDs to components without worrying about the user’s existing runtime configuration. This makes hApp deployment a lot more dependable and user friendly.

Secondly, there was no way for devs to use hApp bundles in the development process. We’ve always intended to give them the tools to create runtime-agnostic hApps, which is why we're announcing a new addition to `hc run`. This update will allow you to use hApp bundles during development, and will be included in the next release.

As a kind of manifest for all the parts that will be called upon at runtime, `hc run` will now first look for a `bundle.toml` file in the current working directory. It will then read the file (if present) and configure its internal conductor to implement that hApp bundle—in other words, add all the instances, bridges, and UIs (via its static HTTP server) and run them. Otherwise, it will create an instance of the DNA in the current working directory as before.

With this change, even if you only have one DNA, hApp development should start with writing a hApp bundle. This makes the hApp project future-proof for deployment. The hApp code should make no assumptions about the environment in which it is executed, other than what’s explicitly named in the hApp bundle. Although hApp bundles are not absolutely necessary, they are a must if you roll your own deployment (e.g., put a conductor into an iOS app and manage the UI yourself), want to use the hApp store, or deploy to Holoscape or Holo Hosting.

Holochain Core Concepts and Tutorials

We want to hear from you! Help us create documentation that would benefit your understanding of Holochain and aid you in building apps. If you have already read, explored, or completed the Holochain Core Concepts and Tutorials, we would appreciate your input through this quick survey! Please take a moment to tell us about your experience and how we might help you further!

Development Status:

Holochain Core Released: 0.0.40-alpha1 | Changelog | Next: 0.0.41-alpha1

0.0.40-alpha1 | Changelog | Next: 0.0.41-alpha1 Holoscape Released: v0.0.4-alpha

Holonix Released: v0.0.52

Tryorama Released: v0.3.0-rc.1

Building with Holochain? We want to hear from you!

Are you building with Holochain? We would love to connect and hear more about your app/platform. Please, take a few moments to fill out this survey! Our goal is to list all the projects building on Holochain on our forum.