I’ve run in to [Automerge](<https://github.com/aut...
# thinking-together
b
I’ve run in to [Automerge](https://github.com/automerge/automerge) this morning. It has a mention in the channel history, but given how exciting I find it, I think it’s worth mentioning again. The technology itself is really interesting, but its principles, ideas and direction are maybe even more interesting. TLDR: it provides a distributed JSON style document store that’s happily “offline first”. Changes made at one node can be propagated to others over any desired medium (Flash disks or network), where they’ll be combined. It has some support for relational style data in the form of a “table” type. Sequence types allow collaborative insert and removal without conflict. IMHO something providing functionality like this will be pretty vital to the future of computing. I envisage we’ll move to keeping programs in a database like this, along with other information such as chats, code review, issue trackers, wiki, ui designs, … basically all the data we use as we develop. It’ll also make sense as a store for all user data: not walled in by a single tool, but freely usable and updatable from any application view on to it. I’m just looking through some internal details documented here: https://github.com/automerge/automerge/blob/master/INTERNALS.md and hoping it’ll make enough sense that I might be able to start on a swift implementation.
👍 4
💯 2
o
Maybe you might also been interested on this article that discuss CRDT and especially Causal Tree. I personnaly found the article very intersting and accessible, and it convinced me to give Causal Tree a try. What's can really interested you is that the author has done some proof of concept of Causal Tree and experiments using Swift! 🙂 Here is the link: http://archagon.net/blog/2018/03/24/data-laced-with-history/
And I totally agree with you. This kind of format or way to manage data can be essential to future of computing. The key point for me is that it allows easier collaboration.
One another advantage of this kind of approach, is that revision control is embedded in the format. Even if some tooling is necessary, you can easily/natively navigate the history of changes.
☝️ 2
As I am convinced by this approach, I have started experimenting with Causal Tree. And Implemented a proof of concept of it in Rust. Why Rust? Not for a "good reason", only because I wanted to try Rust. 😉 And because I wanted to try to run Rust in the browser with wasm_bindgen.
s
b
@shalabh Thanks – the ink and switch folks are doing some really cool stuff, and I like their manifesto position very much. The focus on local whenever possible is surely the right technical, privacy, and … well, economic (?) approach. On “economic”, local data and user ownership seems much more likely to reduce data siloing, which is a natural barrier to entry for any kind of centralised system to exploit.
@ogadaki I also saw the causal tree page too – thank you! Something I’ve not seen with causal trees is how to create stable revision semantics. It’s wonderful for eventual consistency, but I don’t see how to create types in it where I can identify a specific system state and pass that about being sure that everyone will be able to resolve exactly the same configuration that I have identified. I could also hash what I see, but then the state might have changed since the hash was created and surely there needs to be a way to avoid this.
I think it would probably be necessary to build other structures on top of it that could guarantee this, which is probably fine. Perhaps it’s a shame it doesn’t have it out of the box, but then, maybe fully versioned history isn’t quite as important as I imagine.
o
@Benjohn Barnes (sorry for this late answer but I have missed your message for some reason...) Maybe I miss what you are meaning, but I find that with casual tree it is easy to identify revision. In fact, at a lower level a causal tree is just a sequence of events. Each event is uniquely identified by its author (read device/editor unique id) and a timestamp in that author's timeline. A revision is identified by the last event for each author involved in the revision. With this you identify the sequence of events for this revision and you are able to consistently reconstruct the state from it.
b
I think what I was trying to get at, perhaps mistakenly, is that an event i don’t have in a log yet may have “happened before” other events in the log and can be inserted before them when I do finally become aware of it. I was thinking that this makes it hard to “tag” a “version” and declare “this is the stable release at the moment”. But I think you could probably build “something” on top of all this to support stable tags — or I could be mistaken that it’s even a problem!
o
A tag T1 is a list of authors' last events that "you are aware of". If you are aware of new "older events" later (it is weird to write this 🙂 ), they are not included in the revision tag T1. If you want to consider them you need to create a new tag T2. As an offline first system, you could never know what happens concurently, and you can only identify version on events you have heard about. So all this allow to identify versions without ambiguity, considering the full and complete history of the events log, with such a tag you can reconstruct a "past" state. But of course it says nothing on the meaning of a particular tag, i.e. there is no meaning in it for stuff like "this is the stable version at the moment" (as you mentionned).