Marcelo Galv?o Póvoa wrote: > On Mon, Apr 29, 2013 at 8:56 PM, Nico Williams <n...@cryptonector.com> wrote: > > BTW, this has all been solved before (clearly). Research it and use > > whatever protocol pattern is most appropriate (or, if you can't > > because of patents, invent a new protocol). > > > > Some posts on this list pointed at some such prior work. > > I recently implemented a simple collaborative text editor focusing on > maintaining consistency across multiple users edits. I have been > following the discussion about the consistency related issues and > there are indeed several possible approaches. I will try to briefly > describe mine and you can comment about its (in)feasibility.
I can't comment whether your approach would work, but please think how your approach work with several random bits: - we don't have just linear structure of the document and sometimes distance of change can be tricky thing, e.g: - you delete title subsection 1.3.2, now all 1.3.4/5.. subsections must be changed and numbering/reference from other parts of document must be correctly recomputed. If there was label in 1.3.2, you have to find all crossrefs on it and mark it broken. - you change the depth of subsection/paragraph - it affects the whole structure around. - innocent looking actions like cursor movement can change document strucutre - DEPM -> you delete all characters in title of subsection 1.3.2 but still let the empty line. Now another user _just_ move with the cursor around this empty point. DEPM will immediately collapse the structure. The same with double blanks. - add/delete text is not enough. We modify. E.g. we make from equation 1.3 unnumbered formula. Now all crossref links must be checked and other equation number recomputed. While I agree that we could disable some aspects of editation disabling everything except add/remove text seems to make LyX slightly better notepad. Pavel