Comment by satvikpendem
1 year ago
What are you using for syncing? I was looking into multiple CRDT solutions and wasn't sure what to use. In your package.json I couldn't find any specific CRDT or syncing library so I'm presuming you're syncing manually, how are you doing that and handling conflicts?
No it's not CRDT. I opted for something far simpler:
if (a.modification_time > b.modification_time) ...
that's all. Like some other features I originally planned to implement CRDT but then realized I don't miss it. Since this is not a collaborative editor with multiple users editing the same note, CRDT is not that useful. I think the only situation in which you'd want CRDT for a private note taking app is if you're editing the same note from multiple devices while all are offline.
Ah I see, you are using the LWW (last write wins) strategy. That's useful for some scenarios although not all. How did you implement that portion as well?
Take a look at the Sync and Merge section of the readme [1]. I tried to explain it in details.
[1] https://github.com/computing-den/unforget?tab=readme-ov-file...