orbitdb / field-manual

The Offical User's Guide to OrbitDB
210 stars 44 forks source link

How do you set up a cluster? #98

Open jackie-scholl opened 7 years ago

jackie-scholl commented 7 years ago

It's clear from the readme how to set up a database that can be used locally, but I don't understand how to set up a cluster with high availability and durability? It's also not clear to me how database clients could connect to such a cluster without becoming a part of it.

jbenet commented 7 years ago

This is not yet figured out for orbit-db. orbit-db is a CRDT-modelled thing-- and it's in the leveldb or sqllite "db" category. (it may make sense to make clusters of it, but not yet there)

jbenet commented 7 years ago

Possible we may be able to use something like https://github.com/ipfs/ipfs-cluster -- (which maybe is just a libp2p-cluster) to do this

jackie-scholl commented 7 years ago

So is the idea that under the current system, every node stores a complete copy of the entire database, but it's still possible for two nodes to sync their copies?

Edit: Ah, and I think the part that I was missing was that two nodes that are both on the global IPFS network and have databases with identical names will automatically sync with each other, yes?

haadcode commented 7 years ago

@raptortech-js that's the idea, yeah! Currently all databases are in the public network and open to anyone. Obviously this is not what we want and we're working on IPFS primitives that orbit-db can use to provide mechanisms and protocol-level guarantees for private/access controlled databases. Today, if you need such functionality, you have to do it on application level.

sholtomaud commented 7 years ago

How does orbit-db determine which db wins during the sync?

aphelionz commented 5 years ago

Moving to the Field Manual for deeper discussion