Open Gozala opened 5 years ago
I still haven't completely caught up with hypergit's architecture and that discussion, so I'll limit myself to describing the thoughts we've had around this, and get back to you when I understand hypergit's situation and proposed solutions a bit better.
There isn't all that much info on our architecture yet (though a blog post is coming soon) so I'll describe the relevant parts here, briefly.
First, the "pure" git part (the git IPFS remote helper) and the other parts (e.g. issues, projects, patches, and eventually more) are a bit different. The latter are made of "machines" (i.e., the RSMs) programmed in Radicle. Let's talk about that first because in theory you could have that part alone (most obviously, by using a patch-based VCS like pijul or darcs, but also by just storing git commits rather than all the usual objects git uses). (Indeed, if you have the problem solved in the machines, even if there is only one person who can write to the git part, you can have multiple people who are allowed to accept patches on the patch machine, and can always reconstitute the latest state of the repo by fetching the latest git, and applying all newer patches).
Each "machine" is an IPNS link. The person who possesses the keys corresponding to that link can update the link. When they're online, they connect to a pubsub channel; people who want to write send messages there, and the owner's daemon automatically accepts (valid) messages, puts them on IPFS, and updates the pointer. The new data on IPFS contains what was added, plus a pointer to the previous IPFS data; thus, you're always prepending to a list.
The person with the key has to be trusted - though they can't forge messages (they're signed), then can remove messages.
Usually when you collaborate, there are people you trust - traditionally these are called maintainers. We have thought of a system to allow multiple keys to exist, and the project being in some sense the "sum" of these keys. The idea is that, instead of having a single IPNS link, you have as many as there are maintainers. Then maintainers update their IPNS link either by receiving new pubsub messages or, when they go online, by resolving the IPNS of the other maintainers. If IPNS links don't diverge in histories, then you keep getting the longest one. If they ever do, you can try merging (with some sort of arbitrary ordering over keys to determine what side to merge from). If that fails, prompt whomever first notices that failure for merge conflict resolution. If you're careful, this should happen relatively rarely if people are online when accepting patches (at least when we've got near-instantaneous IPNS updates).
Having multiple maintainers/owners to a project ameliorates the "offline writes" problem, but it doesn't solve it. To make sure contributors (non-owners/maintainers) can write and go offline, one option is to have other computers in the network that can temporarily store the data - a federated message queue like ActivityPub, or just nodes that hold messages they see on pubsub channels and try delivering them periodically. @jameshaydon has a more sophisticated idea here, so he can maybe chime in.
Hi,
As I was reading through radicle FAQ I came across few questions that I'd like to provide some thoughts / pointers on:
If I am a project owner, can I get updates from contributors if we are not online at the same time?
I have being thinking about how to enable large number of participants collaborate / maintain the repository in the fully p2p setup. This has came up in the context of hypergit and described it in the following thread, for convenience I'll quote interesting bits below:
From what I gathered RSM in many ways similar to holochain which makes me think this might be a good fit.
Can I collaborate privately?
I have started work recently on Content content-addressable data feed that in many ways similar ssb-feed but is based on IPLD. It also attempts to provide granular access control which I think might enable private collaboration & I'd be interested in collaborating / feedback on how to make it usable in this context.