3 ms·
> they're moving from plain text files to a database I wonder if a database is required for CRDTs. I don't know if logseq use that, but if we had a FOSS note-t
by brunoqc 2y ago
> they're moving from plain text files to a database
I wonder if a database is required for CRDTs. I don't know if logseq use that, but if we had a FOSS note-taking app with CRDTs, we might have to give up the text format.
- mweidner 2y agoYou can store a text-editing CRDT's state in a standalone file instead of in a database. However, it is hard to make the file human-legible or updateable. The best you could do is probably something like a piece table (https://en.wikipedia.org/wiki/Piece_table https://en.wikipedia.org/wiki/Piece_table), or the plain text followed by some opaque CRDT metadata. If you want to preserve the ability to edit plain text files using an arbitrary program, your sync engine could be a file watcher that computes a diff each time the file is saved - like git does, but character-based instead of line-based.