That is very neat. The algorithm: - Label each text character with a globally unique ID (e.g., a UUID), so that we can refer to it in a consistent way across time - instead of using an array index that changes constantly. - Clients send the server “insert after” operations that reference an existing ID. The server looks up the target ID and inserts the new characters immediately after it. - Deletion hides a character…
This is literally a degenerate CRDT. Central server for tie-breaking goes back to Google Wave.
Collaborative Text Editing Without CRDTs or OT
51–60 of 86 posts
Re: Collaborative Text Editing Without CRDTs or OT
#52That is very neat. The algorithm: - Label each text character with a globally unique ID (e.g., a UUID), so that we can refer to it in a consistent way across time - instead of using an array index that changes constantly. - Clients send the server “insert after” operations that reference an existing ID. The server looks up the target ID and inserts the new characters immediately after it. - Deletion hides a character…
This is literally a degenerate CRDT. Central server for tie-breaking goes back to Google Wave.
Re: Collaborative Text Editing Without CRDTs or OT
#53Earlier quoted context omitted.
Even in the absence of a central server, you can still avoid CRDT/OT complexity if you have a decentralized way to eventually total order operations & apply them in that order: https://mattweidner.com/2025/05/21/text-without-crdts.html#d... As others in the comments argue, this is technically a CRDT (though a fully general one); also, undoing/replaying ops is itself non-trivial to implement. However, I hope this is s…
Did you perhaps mean to write, “though not a fully general one”?
Whether the converged result is at all reasonable is a different question.
Re: Collaborative Text Editing Without CRDTs or OT
#54That is very neat. The algorithm: - Label each text character with a globally unique ID (e.g., a UUID), so that we can refer to it in a consistent way across time - instead of using an array index that changes constantly. - Clients send the server “insert after” operations that reference an existing ID. The server looks up the target ID and inserts the new characters immediately after it. - Deletion hides a character…
Is this really that novel? I mean using a central process for serializing a distributed system is like a no brainer -- didn't we start off from here originally? -- until you have to worry about network partitions, and CAP and all that jazz. You also now have a single point of failure. Also I skimmed the thing but was performance discussed?
:)
Re: Collaborative Text Editing Without CRDTs or OT
#55Earlier quoted context omitted.
Is this really that novel? I mean using a central process for serializing a distributed system is like a no brainer -- didn't we start off from here originally? -- until you have to worry about network partitions, and CAP and all that jazz. You also now have a single point of failure. Also I skimmed the thing but was performance discussed?
I really want to believe you were trying to make a reference to cap'n jazz - https://en.m.wikipedia.org/wiki/Cap'n_Jazz :)
:(
Re: Collaborative Text Editing Without CRDTs or OT
#56Earlier quoted context omitted.
Did you perhaps mean to write, “though not a fully general one”?
A decentralized, eventually consistent total order on operations is a fully general CRDT, in the sense that you can put whatever (deterministic) operations you want in the total order and clients will end up in eventually consistent states. Whether the converged result is at all reasonable is a different question.
Re: Collaborative Text Editing Without CRDTs or OT
#57Earlier quoted context omitted.
Could it? If you and I are simultaneously editing a list of people and you are trying to order them by age and I'm ordering them alphabetically, we are still going to have to reconcile the result.
By that definition, it's not a solvable problem, is it?
AFAIK, CRDTs don’t solve semantic conflict issues.
Re: Collaborative Text Editing Without CRDTs or OT
#58Earlier quoted context omitted.
This is literally a degenerate CRDT. Central server for tie-breaking goes back to Google Wave.
Any algorithm that uses a central server as a tie-breaker could easily be replaced by one where client ids are used for the tie-breaker.
Re: Collaborative Text Editing Without CRDTs or OT
#59Earlier quoted context omitted.
No; there is no single consistent final state that the system must converge to if the parts go offline. If you have this document: a{uuid=1} and two clients send the following operations: b{uuid=2} insert-after{uuid=1} c{uuid=3} insert-after{uuid=1} then the following two documents are both valid final states: abc acb That's fine as long as you have an authoritative server that observes all events in a single order a…
What about ordering concurrent operations by id? Then "abc" is the only consistent final state. I get what you mean though, having a central authority greatly relaxes the requirement.
Re: Collaborative Text Editing Without CRDTs or OT
#60That is very neat. The algorithm: - Label each text character with a globally unique ID (e.g., a UUID), so that we can refer to it in a consistent way across time - instead of using an array index that changes constantly. - Clients send the server “insert after” operations that reference an existing ID. The server looks up the target ID and inserts the new characters immediately after it. - Deletion hides a character…
ctrl+a ctrl+x ctrl+v Good luck
I think you could batch these things though. You just need a slightly more advanced protocol. If B is the first id, and L is the last, create range(B, L) as R and insert R after L (assuming Ctrl-v a second time).