Orbit-db: Can orbit-db be run in the browser?

Created on 9 Apr 2016  路  8Comments  路  Source: orbitdb/orbit-db

This could open up some really interesting scenarios for web pages that could store data on IPFS.

Most helpful comment

Check this out:
https://github.com/haadcode/orbit-db/blob/master/examples/browser.html

Browser version available as of v0.7.0. Let me know if you have any problems or questions, I'd be happy to help!

All 8 comments

Not yet. There's a dependency on 'asyncawait' module which only runs in node. I'm in the process of removing that dependency and making it work in the browser, though.

Excellent news, thanks! 馃憤

Glad to see this too @haadcode agree some awesome ways to use this db on the browser with ipfs.

Check this out:
https://github.com/haadcode/orbit-db/blob/master/examples/browser.html

Browser version available as of v0.7.0. Let me know if you have any problems or questions, I'd be happy to help!

Wow, that was fast! This is exciting, I'm going to be playing around with this :)

@haadcode I noticed in the Readme there's a requirement to have an IPFS daemon running for the browser example. Is this because js-ipfs isn't complete yet? Is the ultimate goal to be able to run everything in the browser?

The use case I was thinking about is to allow users to visit a web page and allow the web page to immediately use orbit-db as a database backed by IPFS without requiring anything else of the user.

@haadcode I noticed in the Readme there's a requirement to have an IPFS daemon running for the browser example. Is this because js-ipfs isn't complete yet? Is the ultimate goal to be able to run everything in the browser?

Correct. Unfortunately js-ipfs in not fully ready yet (but it's close), so the only option is to use a local daemon atm. The goal is to, however, make everything work in the browser and I've been basically laying the ground work in orbit-db for the day js-ipfs is ready and it can all be put in the browser without the need to install / require anything.

As for your use case, I would propose to continue to develop with a local daemon for now and once js-ipfs ready, it should be an easy upgrade path to fully working ipfs in the browser. I'll make sure orbit-db doesn't change so that the only thing you need to do is to include 'js-ipfs' instead of 'ipfs-api'. Does that make sense and can you work with that?

Sounds great. This is all still pretty experimental for us, so I'm more concerned about the road map. I've been really impressed with the massive effort going on with js-ipfs, so hopefully we'll see this soon! Great work on orbit-db!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adamski picture adamski  路  5Comments

maroodb picture maroodb  路  3Comments

maxkerp picture maxkerp  路  6Comments

cristiano-belloni picture cristiano-belloni  路  5Comments

oed picture oed  路  5Comments