Holochain Forum

When will Holochain be able to run on mobile devices?

…continued from another thread, in which @dellams asks:

I think the network usage is the more critical issue, especially with the prevalence of data plan limits on mobile. This might not seem a big issue with the clutter example, but what happens in a world of holochain apps that are constantly buzzing the network with packages?

4 Likes

@dellams @sonicviz I don’t want to derail the conversation too much by expanding on the mobile questions, but I do have one comment: both Apple App Store and Google Play Store disallow apps that spawn long-running background processes. This is to save on battery usage. This means no background DHT chatter (or any app feature that relies on node-to-node messaging, such as notification pings) unless you actually have the app open and on-screen. You could release a hApp via the F-Droid store that stays connected to the DHT even after you close it, but most people won’t know what the heck F-Droid even is.

And yes, there would be data plan usage to worry about too.

4 Likes

That’s why I think that maybe the way to go mobile for now is with PWA, connecting directly to Holo… It should be a lot easier this way, it’s accessible and downloadable from a URL, and using Holo guarantees data availability in small networks (like for example a chat gorup).

5 Likes

Ok thanks guys. :slight_smile: I like the PWA and looks useful for future use… :slight_smile:

But I am thinking more of how I will get my Unity game to run on a phone talking to hc? I guess this could still use Holo somehow? But I think Holo only works in a web browser? My game is a standalone unity app so it will not run in a browser. Is there a way I can still route traffic through the holo network? I presume under the hood Holo just uses normal HTTP traffic so this should be possible? Is there anyway of seeing the code that does this so I can then use it in Unity?

I created my HoloNET .NET client to get Unity to talk to hc but I guess I will not be able to use this on a phone then?

As a last resort I could get unity to compile it to WebGL and run it in a browser on the phone but I would rather avoid this if possible… :slight_smile:

Maybe I should create a separate topic for this somewhere on the forum? Where is the best place? Be good to open up this discussion to everyone else… :slight_smile:

Yes, it seems like this is a very in depth topic, maybe create a new discussion to explore all the possibilities. I think the right direction to go is Holo, since it theoretically meets all the requirements. I know that Holo maps domain names to holochain apps (or sth like this) so maybe you have to setup a fake domain or sth like that, but it should be possible.

Here I found an in-depth explanation: https://github.com/Holo-Host/holo-router

1 Like

Great thanks will check that out… :slight_smile:

I’m leaning towards Holo for most mobile stuff too. I would love to see native installed apps using Holo; right now there’s no drop-in libraries to support it though. I’m picturing something that emulates the Chaperon client-side library, only in native Android or iOS code. It will have to:

  1. Generate agent keys on the mobile device — ought to do it based on email/password, as with Holo Host, for compatibility, but all it really requires at the end of the day is an Ed25519 keypair. Can be based on chaperone-key-manager.
  2. Ask the Holo router for a persistent host (WebSocket).
  3. Sign and send all zome function calls to that host (WebSocket).
  4. Respond to the host’s async requests to sign source chain data with the keys generated by 1 (WebSocket).

Mmm there’s things like ionic or react native, that people already use in normal projects, which can “export” web technologies to native applications. Ionic for example does this by encapsulating the application in an “embedded” browser, but it’s still web technologies. So the integration seems pretty easy :slight_smile:

hmmmmmmmm, in that case that sounds like an easy path. Can these webview-based apps do iframes? I’m guessing so.

I think so. But what I need is it to work with unity so I would need to do something like Paul suggests above…

I can give this a try and report back here… would really appreciate as much detail on how to do this as possible… thanks… :blush:

Can’t you just run the connection from Unity via websockets or HTTP, and treat HC like an API?

Is this using the holo network?

The easiest path would be to rewrite the chaperone and use Holo Host for mobile apps, yeah. Native Holochain apps, if we can get the conductor to run on mobile devices with good battery performance and acceptability to the app store review process, would just be a local WebSocket connection between the conductor and the Unity front-end. But I suspect there’d be a fair bit of tooling involved to get the current state-of-the-art working natively.

1 Like