Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  17] [ 6]  / answers: 1 / hits: 36166  / 14 Years ago, wed, february 23, 2011, 12:00:00

I'm writing an application in which I'd like to have near real time collaborative editing features for documents (Very similar to Google Documents style editing).



I'm aware of how to keep track of cursor position, that's simple. Just poll the server ever half second or second with the current user id, filename, line number and row number which can be stored in a database, and the return value of this polling request is the position of other user's cursors.



What I don't know how to do is update the document in such a way that it won't throw your cursor off and force a full reload as that would be far to slow for my purposes.



This really only has to work in Google Chrome, preferably Firefox as well. I don't need to support any other browser.


More From » ajax

 Answers
9

The algorithm used behind the scenes for merging collaborative edits from multiple peers is called operational transformation. It's not trivial to implement though.



See also this question for useful links.


[#93623] Monday, February 21, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
addie

Total Points: 699
Total Questions: 89
Total Answers: 97

Location: Cayman Islands
Member since Fri, Mar 4, 2022
2 Years ago
;