[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question collaborative editing.
From: |
Karl Fogel |
Subject: |
Re: Question collaborative editing. |
Date: |
Thu, 01 Oct 2020 18:10:35 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>IMO the problem of this approach is that if there’s any desync between
>buffer in the library and buffer in the editor the outcome is disastrous,
>and this can not only come from some bug — Emacs and C library
>has to talk asynchronously and bidirectionally, which means theoretically
>there will be case that Emacs does some change, sent a message to
>C library, but some message before C library receive the change from
>Emacs arrives later
> Emacs C-Library
> | | \ / |
> | | X |
> | | / \ |
>V
>Although the latency window on local machine is very small, the latency
>of Emacs Lisp interpreter responding to events is a another complication...
>There are way to work around this of course, but it’ll definitely require more
>work rather than just sending simple operation and buffer position, at least
>there need to be UID for each operation and some transaction mechanism.
>
>I see that Tandem send old text and new text with the text operation. This
>is definitely a workaround with no correctness guarantee, and it doesn’t
>specify what to do when a desync happens. But those are just my mutering
>about correctness, I can imagine that it might work good enough in practice.
Well, hey, Emacs has an `md5' function :-). For example, the result of
(insert (md5 (current-buffer)))
is
5d260ed0f9899cbb9fc53ec96324f5d5
(Of course, the result was wrong as soon as I evaluated it!)
Best regards,
-Karl
signature.asc
Description: PGP signature