3 ms·
Thanks for the article, interesting read! How well does this approach scale to high-concurrency situations? The more active participants there are, the more of
by aburgm 11y ago
Thanks for the article, interesting read!
How well does this approach scale to high-concurrency situations? The more active participants there are, the more often you'd be rejecting client changes and ask them to rebase, causing extra round-trips. It sounds like when a critical number of participants is reached, you'll create change requests more quickly than you can handle them. If each participant has a latency of 100ms to your server, and say you have 10 participants making 2 changes per second each, will you experience some sort of congestion?
On a similar note, what happens if you have two active clients, one with say 100ms latency and another with 500ms? If the 100ms client will be typing continously with 4 characters per second, the changes of the 500ms client won't get through until the 100ms one stops typing, right?
I realize these might not be much of a real issues in practise, but did you consider such cases? In particular, is there something in your machinery that prevents the server from doing the rebase, as opposed to sending it back to the client to do it?
As for references, I went all the way and implemented distributed OT in Gobby (https://github.com/gobby/gobby https://github.com/gobby/gobby). It's somewhat doable for plain text editing, but going beyond that inflates the complexity very quickly. It gives you some nice properties like authorship tracking even across undo operations. However, the complexity goes with at least n^2 with the number of participants, so there is also an upper limit in the number of active participants that's reached rather sooner than later (even though I never actually found out where it is in practise).
- marijn 11y agoI did consider such cases. My current theory is that it is unlikely that clients will keep up a torrent of updates so constant that there'll be a lag of more than, say, a second before any given change gets through. But if this would turn out to be an issue, you could have the server implement some kind of fairness algorithm by slightly delaying clients that recently got their changes through and prioritizing those that made a few unsuccessful tries.