Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

IPFS eventual consistency on shared folders #313

Open
ajres opened this issue May 31, 2015 · 6 comments
Open

IPFS eventual consistency on shared folders #313

ajres opened this issue May 31, 2015 · 6 comments

Comments

@ajres
Copy link

ajres commented May 31, 2015

When using IPFS for usecase 2:

"As a mounted personal sync folder that automatically versions, publishes, and backs up any writes."

How are concurrent edits on different nodes merged so that the all nodes eventually see the same file system state.

If I understand correctly, each node would write a new commit object on changing the file system, but how are (potentially) conflicting commits on different nodes merged?

Andy

@lucamartinetti
Copy link

Very good question. Can somebody please answer?

@fiatjaf
Copy link

fiatjaf commented Oct 11, 2015

answer attempt:

IPFS deals with files and hashes of files. There's no concept of "tracking" a file, if a file (or directory) changes and is updated on IPFS, it will be referenced by a different hash. It's up to you, or an external daemon, to keep track of which hash, from those published on IPFS, corresponds to the "newest", or "correct" version of a file.

@mappum
Copy link

mappum commented Oct 11, 2015

Conflicting commits can be prevented by using CRDTs.

There's no concept of "tracking" a file, if a file (or directory) changes and is updated on IPFS, it will be referenced by a different hash. It's up to you, or an external daemon, to keep track of which hash, from those published on IPFS, corresponds to the "newest", or "correct" version of a file.

This is handled by IPNS. The path /ipns/HASH_OF_YOUR_PUBKEY will point to the latest version of your directory, since you can sign the latest version's hash and publish it to the DHT.

@jbenet
Copy link
Member

jbenet commented Oct 12, 2015

To add to this:

  • yes, we will handle this (likely with commit objects, or other versioning structures)
  • commit objects are WIP -- Versioning: Commit + Repo Datastructures #23
  • yes IPNS right now publishes the latest snapshot of a dir, but yes should point to a commit (or other versioning datastructure, such as a CRDT)

@daviddias daviddias transferred this issue from ipfs/ipfs Jan 4, 2019
@danimesq
Copy link

danimesq commented Jan 4, 2019

@jbenet
Any news?

@Stebalien
Copy link
Member

  • We've been doing a lot of work on CRDTs. Check out peerpad.
  • The peergos people have been working on building something like this on-top-of IPFS.

IMO, the primary missing component is private content and/or access controls. Right now, that can be layered on-top-of IPFS but that basically means you need to layer a second encrypted filesystem on-top-of IPFS (which is suboptimal...).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants