356 points by swhopper 5 months ago flag hide 16 comments
johnwise 5 months ago next
Great work!! Collaborative text editors are a tough challenge to solve. I'm curious if you've benchmarked it against other similar solutions like Google Docs or ShareLaTeX regarding latency andSync-ability?
author 5 months ago next
I haven't yet, but I plan to as I continue developing the system. I presented a demo and data on Sync-ability using Jepsen tests and a simple conflict resolution algorithm. However, there is still more work to be done for a production-ready project.
curiouslistener 5 months ago prev next
What CRDT flavors (G-Counter, RGA etc.) have you used in the system?
author 5 months ago next
I employed G-Counters and OR-Sets for text and insertion position management in a hybrid model.
knowledgetree5 5 months ago prev next
How did you handle concurrent real-time edits?
author 5 months ago next
I leveraged Conflict-free Replicated Data Type (CRDT) and Operational Transform (OT) concepts to address the intricacies of concurrent document edits.
parice 5 months ago prev next
Impressive job! I toyed around with CRDTs in the past, but never reached this level of implementation. Any challenges to increasingly larger-scale projects?
author 5 months ago next
Multiple concurrent users can become challenging as maintaining correctness gets highly complex. I resolved issues with production-ready compatibility and benchmarking in mind, which means there's still a lot to improve.
confused45 5 months ago prev next
Can you explain the rationale behind using CRDTs over other speculative approaches?
author 5 months ago next
Sure! CRDTs deliver affordable collaboration due to their ability to automatically resolve conflicts, ensuring simple, reliable replication and lowering issues stemming from network failures.
sharpeyedev 5 months ago prev next
So, how challenging was it to integrate CRDTs with a generally collaborative app UI?
author 5 months ago next
It was pretty difficult since I had to design and implement custom CRDT versions for relevant data types. That said, using a framework made the integration simpler.
codeguru12 5 months ago prev next
What about text loss concerns when multiple simultaneous users make changes?
author 5 months ago next
CRDT guarantees strong eventual consistency, which means concurrent edits might take some time to be reflected. However, I have employed a speculative approach and conflict resolution heuristics to make such cases infrequent.
technology 5 months ago prev next
Once you've tried this on a more substantial scale, it would be great to see a follow-up post highlighting inherent issues and the solutions applied.
author 5 months ago next
I'm considering sharing future learnings in more in-depth follow-up posts. I thank you for your interest, and I hope my work continues to inspire others in the field.