Re:Lessons learned from creating a real-time collaborative r...
by bawana on Tuesday October 16, 2018 @02:17PM
(#18231749)
I dont understand why this is so hard. If you take a document and enter each character into a database as a separate entry, then only lock each character as it's changed and unlock it immediately afterwards. The likelihood that all individuals will be modifying the same character at the same time is low. and while it's locked, the person trying to change it will see it's not changing - so they'll try again in a second or two by which time it will be unlocked.
[ Parent
| on HN ]
Re:Lessons learned from creating a real-time collaborative r...
by jerf on Tuesday October 16, 2018 @03:04PM
(#18232187)
Among the many other problems with your proposal, you are assuming an editor that can only insert and delete characters, so no selection, copy, paste, search and replace, and any other features that involve modifying more than just one character in a document at a time, since you're critically depending not just on the fact that all edits can theoretically be represented by single character changes but that the rate of such changes must necessarily be very, very low, bounded by human typing speed.
"OK, so to fix that, I'll just..."
That'll break in some other case. If you then work on fixing that up, in another 20 or 30 steps, you end up at these algorithms. Or something far worse, which is actually pretty likely if you try to bodge something together one hyper-local problem at a time.
Re:Lessons learned from creating a real-time collaborative r...
by Skunkleton on Tuesday October 16, 2018 @09:29PM
(#18234884)
No, op is assuming that an editor can only _replace_ characters.
Re:Lessons learned from creating a real-time collaborative r...
by Skunkleton on Tuesday October 16, 2018 @02:18PM
(#18231777)
Ok, so what happens when you insert a character?
Re:Lessons learned from creating a real-time collaborative r...
by silasdavis on Tuesday October 16, 2018 @02:40PM
(#18232007)
That sounds like a horrible UX