|
|
|
|
|
by mweidner
697 days ago
|
|
You 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), 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. |
|