3 ms·
Hi! Awesome post. I've been working on a similar project based on the quill editor [1], which is in turn based on the rich-text OT library [2]. Initially, I th
by thomsbg 11y ago
Hi! Awesome post.
I've been working on a similar project based on the quill editor [1], which is in turn based on the rich-text OT library [2]. Initially, I thought to wire this all up using the sharejs project [3], but never could quite grok that codebase.
Instead, I've been working on a similar system to one you describe, with changes applied in order based on sequential version number, and concurrent updates forced to "rebase" against earlier changes (not yet open-sourced).
A question:
> Because applying changes in a different order might create a different document, rebasing isn't quite as easy as transforming all of our own changes through all of the remotely made changes.
Can you explain more about how you arrived this conclusion? From my understanding, a correct transform function should allow exactly this, according to transformation property 1 [4]. Perhaps your algorithm doesn't exactly satisfy this property; what characteristics does it have instead?
[1] http://quilljs.com/ http://quilljs.com/
[2] https://github.com/ottypes/rich-text https://github.com/ottypes/rich-text
[3] http://sharejs.org/ http://sharejs.org/
[4] https://en.wikipedia.org/wiki/Operational_transformation#Convergence_properties https://en.wikipedia.org/wiki/Operational_transformation#Con...
- marijn 11y ago> From my understanding, a correct transform function should allow exactly this A correct OT transform, yes. But I'm not using OT's invariants, so this is not something my transforms do. For example, in my system, if you have "insert X at pos 5" and "insert Y at pos 5", the document will contain "XY" or "YX", depending on which arrived first.
- thomsbg 11y agoInteresting! I'm excited to see how this all turns out, and what we can learn from each other.
- josephg 11y ago(ShareJS author here) Sorry ShareJS is such a mess right now. I did a bunch of work to make it into a kind of OT-backed database to power derbyjs. Its very much straddling two worlds at the moment and I think its doing a bad job of both. It'll get cleaned up eventually.