With the the combination of sim2h and Holoscape we have a fully working Holochain stack again - for the first time since we abandoned the Go prototype in 2018.
This is super exciting and creating a shift for us internally as we are switching over to more and more full-integration user testing of hApps and are looking into dogfooding!
As I describe in yesterday’s blog post about sim2h, we are running a public sim2h switch-board server at wss://sim2h.holochain.org:9000
. This allows anybody to run hApps over the internet and easily connect Holochain conductor instances for real-world alpha testing of hApps! The latest Holoscape release is configured to default to sim2h as the networking implementation and to using this public server.
Also, since v0.0.2 (current latest is v0.0.3), Holoscape contains a simple prototype of a hApp store that currently is backed by our hApp-index repository. It allows users to install hApps with a few clicks.
The result is that with Holoscape, hApps can be installed and used over the internet without requiring the user to have in-depth knowledge about Holochain and all the details of how to setup conductors with DNAs and UIs. It should just work.
With this thread I want to invite all of you hApp developers to use Holoscape, sim2h and the hApp-index to share, run and test your hApps over the internet and discuss your results with us here!
What do you need to do?
1. Create your hApp-bundle
If you have a working hApp, consisting of at least one DNA and one UI, the only thing you would need to add, in case you did not yet, is a hApp-bundle file. hApp-bundle files are like a manifest for a hApp, describing the used DNAs, UIs and potentially bridges - and the relationship between all of these. Holoscape can read and install hApp-bundle files. It will follow any links inside the bundles to download DNAs and UIs and only install them if they are not yet installed (-> several hApps can reference the same DNA they both depend on via bridging, Holoscape will not install that dependency twice).
Let’s have a look at an example:
bridges = []
[[instances]]
name = "holofuel"
id = "__holofuel"
dna_hash = "QmcnYu8B54tFnJUv68aB3imPRwLxqJH2DQzjkX9Dvxmsf9"
uri = "https://holo-host.github.io/holofuel/releases/download/v0.11.1-alpha1/holofuel.dna.json"
[[UIs]]
name = "HoloFuel"
id = "holofuel-app"
ui_bundle_hash = "Qm34abcde"
uri = "file:./holofuel-ui.zip"
[[UIs.instance_references]]
ui_handle = "holofuel"
instance_id = "__holofuel"
Here we have the simple case of only one DNA/instance and one UI. The DNA is linked to remotely. The UI is expected to be delivered as zip file, next to the bundle. Please note that we have to include the empty array bridges = []
in this case so Holoscape can parse the file. (There is no good reporting in Holoscape yet, a parse error might result in no contents being shown.)
The last section conveys the information that the UI uses the DNA - and it does so under a certain name: holofuel
, set with the ui_handle
variable. This is the name of the instance the UI assumes to be there when run inside a conductor. The string holofuel
will be hard-coded inside the UI in any occurrence to callZome(...)
.
2. Deploy your hApp-bundle
You can install your hApp in Holoscape from a local file first. You should start with that to test your hApp-bundle and DNA and UI files.
Once you are sure your bundle works, you can send the bundle file to your users via any channel of your choosing. In order to not have to send several MBs of DNA and UI binaries, best upload those files somewhere (like a release on your Github repository) where they become accessible via public URL which you then put into the bundle.
Now, if you want to share your hApp with the world, please create a pull-request to the hApp-index as described in its readme! Once that PR gets merged, your hApp will show up in all Holoscape instances and becomes installable with just two clicks
3. Come back to this thread and share your findings
Holochain, sim2h and Holoscape, everything is still alpha. But we are getting close to actual usability. We are currently iterating quite quickly and finding new bugs as we try more hApps, and fix those bugs as we go. We expect this to continue for a few more weeks until we can really use most of the existing hApps. But we need that testing and raising of issues in order to know what really is needed for the next increment of usability. Also, we want to find out what the scaling limits of sim2h and the current Holochain core code are - under real-world conditions. This is why I’m reaching out to you folks with this request
As of the time of this writing, the Holochain crew is working mainly on two issues that you might experience as well (though the actual data, if you do and with what hApp, would be extremely helpful for us!):
- There is an occasional deadlock of Holochain core that might be logged with
IMMORTAL LOCK
. - In some hApps under some conditions, we can’t seem to see entries on a node that wasn’t online when those entries were created.
These problems might be solved in a few days - and we might have found new ones with your help.
But we had many surprisingly smooth test runs of hApps within the last few weeks, so we think it is a good time to broaden the circle of alpha testing and invite your collaboration and feedback!
Final note: As described here, we want to utilize sim2h’s capability to log network messages for debugging. Holoscape clarifies this in the network setup wizard if the default public server is chosen. Please only use our server if you are ok with us logging network traffic for this purpose.