3 ms·
Manually! The CRDT itself is an event log. The client state is built from a secondary data structure which replays from the log (the extent of the "replay" dete
by sambigeara 5y ago
Manually! The CRDT itself is an event log. The client state is built from a secondary data structure which replays from the log (the extent of the "replay" determined by how much data needs to be merged etc)
- 0des 5y agoThere is so much good work here, good job. Just curious, what pushed you to make this aside from the obvious usefulness of it? Was there something specific? Also, while making it, did you perhaps also use it to collab with others during the process? Thanks again
- sambigeara 5y agoThanks so much! Honestly, this was a personal project that got a bit carried away. The initial iteration was just a simple terminal app that allowed me to fuzzy-search through a lot of my notes quickly, with the ability to store and access a plain text file against each. I was rsyncing to the cloud so I could access my data across different machines, but got frustrated at the lack of conflict resolution, so figured I'd build a mergable data structure and use that. It _then_ became annoying that I couldn't easily access my list on the go, and hence the web app was born. I actually (amusingly) built this completely on my own, which certainly made things more challenging WRT testing the collaborative components. Have certainly had the opportunity to test it a bit (mostly for "life" things such as sharing shopping lists...) but hopefully opening up the MVP will get some more organic and extensive usage and the opportunity for some good feedback!
- aaaaaaaaata 5y agoWhat's the worst edge case you're aware of that you're not handling?
- sambigeara 5y agoGood question. It's probably not even an edge case (dependent on usage), but a limitation right now is that a unique "unit" of collaboration is a single item/line, so if two people update a line offline, the winning line will the most recently updated. I can imagine that would get pretty annoying pretty fast. Granular collaboration (updating per character rather than per line) is on the backlog, priority will be determined by feedback of course. Another thing to solve is ever-growing data sets. I've tinkered with some mechanisms to combat this (namely compacting the CRDT event log based on a bunch of rules) but this is tricky and I'd prefer the app to mature a little before I implemented this. Also on the backlog! Lots to do for sure.