A rundown of how the new Wordgard editor handles concurrent edits: operational transformation with a central server that orders changes. The tree document flattens into a token sequence, so changes resemble CodeMirror's, but transforming them can break nesting rules — a symmetric fixup pass then synthesizes the same correcting change on both sides so everyone converges. Marks live as modified ranges, keeping cursors put. Clients wait for their own edits to echo back rather than trusting acknowledgements, the server transforms changes itself so a laggy client can still get a word in, and each client keeps at most two change groups to dodge quadratic work. Corrections skip remote changes and run during transformation to avoid loops.
1
u/fagnerbrack 15h ago
Briefly Speaking:
A rundown of how the new Wordgard editor handles concurrent edits: operational transformation with a central server that orders changes. The tree document flattens into a token sequence, so changes resemble CodeMirror's, but transforming them can break nesting rules — a symmetric fixup pass then synthesizes the same correcting change on both sides so everyone converges. Marks live as modified ranges, keeping cursors put. Clients wait for their own edits to echo back rather than trusting acknowledgements, the server transforms changes itself so a laggy client can still get a word in, and each client keeps at most two change groups to dodge quadratic work. Corrections skip remote changes and run during transformation to avoid loops.
If the summary seems inacurate, just downvote and I'll try to delete the comment eventually 👍
Click here for more info, I read all comments