4 ms·
I haven't yet done this but based on some research it seems to me like the core of any collaborative app today (that wants to avoid Firebase and the other hoste
by eatonphil 5y ago
I haven't yet done this but based on some research it seems to me like the core of any collaborative app today (that wants to avoid Firebase and the other hosted platforms like Replicache seems to be) is easiest served by picking some CRDT library.
There are a couple of open-source CRDT libraries that provide both clients and servers (yjs [0] and automerge [1] are two big ones for JavaScript I'm aware of).
My basic assumption is that as long as you put all your relevant data into one of these data structures and have the CRDT library hook into a server for storing the data, you're basically done.
This may be a simplistic view of the problem though. For example I've heard people mention that CRDTs can be space inefficient so you may want/have to do periodic compaction.
[0] https://github.com/yjs/yjs https://github.com/yjs/yjs
[1] https://github.com/automerge/automerge https://github.com/automerge/automerge
- brunoqc 5y agoWould Chronofold works for this too?
- feanaro 5y agoYou probably don't want to use Automerge. See https://josephg.com/blog/crdts-go-brrr/ https://josephg.com/blog/crdts-go-brrr/ for a nice CRDT optimization story.
- eatonphil 5y agoInteresting! I know there was a large performance refactor that was merged in May [0]. This post you link was written in June of this year. Unclear if the performance fix is related to the reported issues and unsure if it still exists or not. At the very least, the automerge maintainers seem to be very actively tackling performance problems. [0] https://github.com/automerge/automerge/pull/253 https://github.com/automerge/automerge/pull/253
- josephg 5y agoYep, the version of automerge I benchmarked for that blog post includes automerge’s performance branch changes. They’re working on it, but it’ll be awhile before automerge gets close to Yjs in terms of performance.
- tabtab 5y ago> is easiest served by picking some CRDT library. RDBMS A.C.I.D. and transactions are also capable of much of the same.
- aboodman 5y agoReplicache is not hosted - it's client-side only. You bring your own backend.