LiteCore and IPFS

42 views
Skip to first unread message

Adam Wilson

unread,
Oct 20, 2017, 7:46:48 PM10/20/17
to Couchbase Mobile
Continuing on from https://github.com/couchbase/couchbase-lite-core/issues/274

I have been thinking about this, and I think it would be a great asset to be able to use IPFS and its "Merkle DAG" storage as a remote data store for LiteCore. I have been reading around, and to answer your previous questions Jens:
"how does it manage mutable data?" - you can use IPNS to store mutable data, as a "peer ID". This would be equivalent to a document ID. 
 "Does it have a notion of a revision ID? Or I guess the hash of the data may form the revision ID, in which case there's a different identifier for the document itself?" - As far as I can tell, the hash is the link to the immutable data, so similar to the revision ID in CouchDB. In terms of the "document itself", I think that can be referenced with a CRDT structure and/or IPNS (I'm still wrapping my head round all this stuff). 

There are a few projects building LevelDB compatible layers on top of IPFS, so a CouchDB / LiteCore compatible layer should be feasible. (Most of the projects are written in Javascript, or Go).

Adam Wilson

unread,
Feb 13, 2018, 5:40:42 PM2/13/18
to Couchbase Mobile

Bringing this topic back up here. 

I'm thinking about a custom replicator that would talk to IPFS instead of Sync Gateway/CouchDB.

What would be needed for this to be implemented? Ideally in a way that could be read in from a web app also. I've been following developments at OrbitDB to get some ideas, most recently a plugin that replicates from OrbitDB (IPFS based DB) to PouchDB: https://github.com/garbados/pouchdb-orbit

My understanding of replication is its simply reading in and applying the changes feed and then, dealing with conflicts (the complicated part I guess).


Any pointers would be much appreciated, thanks. 

Reply all
Reply to author
Forward
0 new messages