Holochain Dev Pulse 09 — Notifications Groundwork

Responsive User Interfaces and Meaningful Links

Holochain Dev Pulse 09

Holochain Design
Jan 2, 2019 · 5 min read

Summary

Happy New Year to our community! We hope you spent time enjoying the holidays — we did too! This week’s work was on the modest side; you will find the Github activity lighter with fewer commits and pull requests as our devs were getting a well-deserved break. They will be back in full force next week and returning to their regular development cadence.

Holochain 101 education

Highlights

1. Signals: Better Debugging Experiences and Responsive User Interfaces
2. Holochain 101: Links Deep Dive

Details

1. Signals: Better Debugging Experiences and Responsive User Interfaces

*Preparations work for signals — get notified about things happening inside a hApp!

signals/ notifications

This will make hApps feel as lively and responsive as traditional server-based apps, without the processing and network overhead of our previous prototype — or the glacial pace of blockchain consensus.

The first set of listenable events (or ‘signals’) will be things only developers get excited about — internal events fired by the core itself. These will be exposed to debugging tools, although some of them may be exposed to zome functions too. Currently, when you’re running multi-agent scenario tests, agent 2 has to keep polling the DHT until it sees the data that agent 1 published. On one hand, this is great because it mimics the behavior of a real-world network. On the other, it can be frustrating to do this checking when all you want is a test result.

2. Holochain 101: Links Deep Dive

What do links enable?

DHT (Distributed Hash Table)

Holochain introduces a different (unlike table-based queries) tool to make data discoverable, and it’s simple and powerful. It’s called ‘links.’ It’s another type of data that lives on the DHT alongside normal app entry data.

It turns the DHT from a flat data store into a ‘graph database,’ (a network of connected data). The DHT is now a searchable space again; it connects the things you know to things you don’t know, which then becomes the things you know. When you know the address of one entry, you can query for any entries that are linked to it.

A link creates an association between the addresses of two different entries, from the ‘base,’ the known thing, to the ‘target,’ (the unknown thing) in the DHT.

In addition to the two addresses, a link has a ‘type’ and a ‘tag.’ The links’ types have to be defined in your application alongside entry types. For example, a music app might have two entry types called ‘artist’ and ‘album,’ and two link types that connect between them. One link’s type would be ‘artist_to_album’ so you can query the albums that an artist has published. The other type would then be ‘album_to_artist’ so you can query the creator(s) of the album. The tag is a more flexible field, and something that can be set when the link is stored.

music apps

The links are stored along with the artist entry itself, so the nodes that are responsible for holding that data will respond with their list of linked album addresses.

Your node can then ask the DHT for the actual album data at those addresses, which will be held by other nodes. This is how you go about getting data in the aggregate back from the DHT.

Distributed apps need to be secure…

We want your feedback!

Please take 3.5 minutes to take our Dev Pulse Survey, and help us name a crucial piece of Holochain!

Connect with the developer community

Holochain

Holochain enables a distributed web with user autonomy built directly into its architecture and protocols. Data is about remembering our lived and shared experiences. Distributing the storage and processing of that data can change how we coordinate and interact. www.holochain.org

Holochain Design

Written by

Creating an ecosystem of decentralized applications with distributed, user-controlled storage. Cheaper, faster, better than #Blockchain @metacurrency @H_O_L_O_

Holochain

Holochain

Holochain enables a distributed web with user autonomy built directly into its architecture and protocols. Data is about remembering our lived and shared experiences. Distributing the storage and processing of that data can change how we coordinate and interact. www.holochain.org

More From Medium

More from Holochain

More on Dev Pulse from Holochain

More on Dev Pulse from Holochain

Integration Efforts & 5000 Nodes

87

More on Dev Pulse from Holochain

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade