Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrbitDB pinning service #83

Open
coyotespike opened this issue Mar 30, 2018 · 6 comments
Open

OrbitDB pinning service #83

coyotespike opened this issue Mar 30, 2018 · 6 comments

Comments

@coyotespike
Copy link

Because orbitdb is based on js-ipfs, and js-ipfs does not yet have garbage collection, all orbit databases are persistent. In IPFS terms, orbit databases are pinned by default.

However, when run in the browser, an orbit database uses localStorage (and leveldb to cache). This is a surprisingly robust method of storage, but it is still a bit vulnerable. In addition, for a new browser user to sync to the orbit database, another user must be online simultaneously. A user who starts an orbit database and then switches devices will have the same problem.

As haad says, this is the classic bootstrapping problem.

It would be helpful to have an easy way to run a pinning service which will replicate a database and stand ready to sync with new users, to provide resilience and availability. This pinning service would be a cluster of orbit database servers, and so this issue is closely related to orbitdb/orbit-db#165, setting up an orbitdb cluster.

@haadcode
Copy link
Member

@coyotespike this is a great idea and something I've been thinking about for long time never having the time to implement. We always needed such "bootstrappers" (always available nodes that can serve the content when others are offline) for Orbit.chat but never had them.

At its simplest, I think, having a way to easily boot up an orbitdb node and start syncing (replicating) a database would be enough to get started, but I really like the idea of a cluster as it gives much more flexibility and power to manage the availability.

I know you're already working on something @coyotespike, so if there's anything we can do to help, let us know and please do share the code if/when possible :)

@cristiano-belloni
Copy link

@coyotespike @haadcode in its simplest form, can't a bootstrapper be a node process somewhere in the cloud which just replicates a list of databases? For minimal effort, it could even be a slightly modified version of the Getting Started code running on an Headless Chrome process :)
Or I'm missing something?

@coyotespike
Copy link
Author

I think that's right! You just have to give your bootstrapper the database address to replicate, or a list of them. Hopefully we will open-source a pinning service soon.

@abh1manyu
Copy link

abh1manyu commented Feb 6, 2019

@coyotespike @cristiano-belloni I'm also trying to figure out best way to pin/save DBs from other peers running browser based IPFS nodes. Did you find an optimal approach to handle this? TIA!

cc @haadcode @shamb0t

@Jon-Biz
Copy link

Jon-Biz commented Jun 5, 2019

Hi all,

In the process of familiarizing myself with orbitdb (and meet my own needs), I've created this pinning service:

https://github.com/Jon-Biz/orbitdb-pinner

You can pass/configure it with an orbitdb address to pin, or have it respond to http requests to /pin and /unpin.

It uses it own orbitdb instance to keep track of the pins, so pins persist between restarts. What's more: you can pass it the address of another orbit-pinner, and have it follow that one, creating a cluster.

@aphelionz
Copy link
Member

Moving this to the Field Manual Repo <3

@aphelionz aphelionz transferred this issue from orbitdb/orbitdb Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants