sonar
sonar copied to clipboard
Clarify forking and merging workflow
Current state of things:
- Alice creates an island Videos. This means
- a) she creates a new record feed which is writable for her. Let's say its key is
A. - b) she creates a new local kappa scope
kAand adds the feedAto it - c) she starts to swarm all feeds in
kAunderdiscoveryKey(A) - d) she puts some records to
kA, which means they are putted intoA
- a) she creates a new record feed which is writable for her. Let's say its key is
- Bob receives
Afrom Alice (outside of Sonar). Bob clones the islandA. This means- a) he creates a local kappa scope
kA - b) he joins
discoveryKey(A)to ask for feedA, downloads it and adds it tokA - c) he creates a new writable feed
Band adds it tokA - d) he puts some records to
kA, which means they are putted intoA
- a) he creates a local kappa scope
- Claire does the same as Bob
Because Alice doesn't know about B her kA doesn't include B. What we currently do support is the following:
- Bob sends Alice
B - Alice adds a source record for
Bto her feedA. This causesBto be added for Alice'skA. For Bob, this changes nothing because hiskAalready includesB
However, Bob could also send his key to Claire. Then, the following would happen:
- Bob sends Claire
B - Claire adds a source record for
Bto her feedC. This causesBto be added for Claire'skA - Because Claire syncs
Ain herkA, this will also addBto herkA - For Bob, this changes nothing because his
kAalready includesB - For Alice and everyone else syncing
Athis changes nothing becauseAdoesn't have a record for eitherBorC
This model is interesting and might work out, however there's several challenges involved:
- There's no definite notion what
kAis, the only shared knowledge is that it includesAand all feeds authorized byA - At several times, we talked about making the "add a writable feed to my local
kA" an explict action ("fork", "make writable", "enable edit") instead of it being automatic - This presents a challenge to the UI - it will be mandatory to, for each island, say
includes unmerged changesor something like this. Once Alice authorizes a peer, the message would change toauthorized writer - We currently wouldn't support to show an island in different states. This means that once Bob started making changes, he cannot view the island in the unchanged state (the UI could enable that, but only through manual filtering)
An alternative workflow look be more like git forking:
- Bob clones
Awhich createskAfor him and syncsA+ referenced feeds - The island is readonly, Bob cannot make any changes
- When Bob clicks
Fork this island. This creates a new feed writable feedB, adds a source record forAto this feedB, creates a new local kappa scopekB, and starts offeringBandAunderdiscoveryKey(B) - Bob now has 2 local kappas: readonly
kAand writablekB, wherekBincludes everything fromkA - Bob can send
Bto Alice, and Alice canmerge B into A - However, at least currently, if she wanted to "preview"
kB, she'd first had to createkB, index it, then decide to merge, which would addB toAand thuskB===kA` - This has the effect that now, for Bob,
kA' andkBare identical. Therefore,iAandiBare also identical, apart from their swarm address:iAis swarmed underdiscoveryKey(A),iBis swarmed underdiscoveryKey(B)` - If he told others about
iBhe should likely continue swarmingiAunderiB. - An alternative would be that, when clicking
fork, a newkBis created, butBis set toswarm on root address discoveryKey(A). To share his changes with others, he'd send a link that looks likesonar://discoveryKey(A)?include=B(or evensonar://A?branch=B)
Maybe it makes sense for us to pick up the fork/branch terminology. Not sure yet, will have to think all this through once more.