If you’re a Windows user and are unfamiliar with Linux, we encourage you to take it easy, remember to swap \ with / in your folder paths and get acquainted with the Bash terminal. If you run into trouble, come and talk to the friendly developer community on our Mattermost chat server.

2. Debugging: Calls to Other Zomes and Bridges Now Log Errors

In this release, we’ve added error logging for failed calls across bridges and zome boundaries, which should make your life a little bit easier. Previously, errors would merely get returned to the calling function, but now they also get logged on the way through.

This feature is part of our ongoing quest to improve error messages. You’ve heard us talk about this before, and you’re hearing it again. This is because our developer community discovers error messages that lack clarity on a regular basis, and we strive to improve them as soon as we hear about them. They’ll be improved more often as developers use our framework in new ways and suggest ways to make error messages more useful.

Error Messages

Please continue to help us by suggesting or contributing improvements!

3. Bridging/Breaking Change: Bridge Configuration Checked for Correctness

Holochain apps are meant to be architected like a set of microservices unified by a single UI. Sometimes the UI can be the mediator between DNAs, requesting data from one and performing actions in another in response to the data received. But sometimes a DNA needs stronger data integrity guarantees, which can only be provided by talking directly to the other DNA.

For this, we have bridging, which lets one DNA open up a channel to another DNA and call its functions directly. The conductor mediates the communication, providing assurance that the data hasn’t been modified en route.

Bridges set up dependencies between DNAs. You can describe a dependency by the DNA’s hash or by the features it says it has. We call these features ‘traits.’

Previously, the conductor did not alert you to configure bridges that weren’t actually correct. With this release, the conductor analyzes the bridges you’ve configured and tells you if the dependencies aren’t satisfied properly.

Breaking change: Now that bridge configuration is checked for sanity, you’ll need to define bridge dependencies in your zome’s DNA JSON file in order to use bridging. Our next step is to develop tooling to automatically generate this JSON from your zome source code.

4. Bridging: Live Changes to Bridge Configuration No Longer Require Restart

The conductor admin API lets you modify a running conductor’s configuration, including bridge configuration, on the fly. This, in turn, lets you incorporate features into your app’s GUI to allow users to spin up new apps and choose which DNA microservices to use for particular features (e.g., swappable commenting, annotation, or user profile auto-fill).

Bridging: Live Changes to Bridge Configuration

Previously, when you used the admin API to configure bridges, the changes wouldn’t take effect until the conductor was restarted. Now, they take effect immediately.

5. Developer Experience: Safe Serialization/Deserialization of Result Type

App devs have been giving bridging a try. Bridging allows you to call another DNA’s zome functions, and zome functions return a special type of Result. (For those of you who aren’t familiar with Rust’s Result type, it allows you to return either a value or an error from your function.) However, when the calling function receives the result, it’s just a JSON string. App devs have found it annoying and error-prone to convert this back to a Result type.

Safe Serialization

Here’s an example of such a bridge call, which wasn’t guaranteed to work:

let result_json = hdk::call(/* params for fn in other DNA omitted */)?; serde_json::from_str(&String::from(&result_json)) .map_err(|e| HolochainError::SerializationError(e.to_string()))?;

To improve the situation, we’ve implemented a conversion from JsonString to Result.. Here’s how that bridge call would look when using this feature:

let result_json = hdk::call(/* params for fn in other DNA omitted */)?; result_json.try_into()?;

We hope this new feature saves you keystrokes and headaches.

Development Status:

Building an App/Platform on Holochain? We want to hear from you!

Are you building on 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 website.

We Want To Hear From You!

Stack Overflow: Expand the Holochain Knowledge Base

Help us grow the Holochain knowledge base on Stack Overflow!

Submit your Holochain question.

Submit your Holochain Rust question.

Contribute to Documentation

Lastly, to all of our readers — we’d like to encourage you to submit an issue or a pull request if you are interested in contributing to code. If you have a passion for, or would like to see, improvements made to the documentation, submit a new issue or add a suggestion to the Holochain Guidebook.

Learn more about Holochain and join our community!

Website | Mattermost Chat | Youtube | Reddit | Medium | Twitter