[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/crdt cc37dcd 04/18: add description of bridge protocol
From: |
ELPA Syncer |
Subject: |
[elpa] externals/crdt cc37dcd 04/18: add description of bridge protocol |
Date: |
Thu, 9 Sep 2021 12:57:11 -0400 (EDT) |
branch: externals/crdt
commit cc37dcd9378e69b56dff839102f3b880660bcf50
Author: Qiantan Hong <qhong@mit.edu>
Commit: Qiantan Hong <qhong@mit.edu>
add description of bridge protocol
---
HACKING.org | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/HACKING.org b/HACKING.org
index eab1b13..5ad8093 100644
--- a/HACKING.org
+++ b/HACKING.org
@@ -142,7 +142,7 @@ By implementing synchronization primitives for all
components in a buffer,
pretty much everything can be made collaborative.
Synchronize arbitrary buffer-local-variable reasonably is hard, but user
annotations can help.
-** TODO list
+** TODO task list
- [X] synchronize buffer text (insert/delete)
- [X] synchronize overlays
- [-] synchronize major/minor modes
@@ -154,3 +154,50 @@ Synchronize arbitrary buffer-local-variable reasonably is
hard, but user annotat
+ [ ] a library of CRDTs
- [ ] synchronize text properties (any use case for this?)
- [ ] synchronize markers (any use case for this?)
+
+* TODO Cross-editor support
+
+The current plan is to reuse the Emacs implementation as a local server for
any other editor, aka Emacs as a service.
+The benefit is that we don't need to reimplement the sophiscated CRDT
algorithm in other +uncivilized+ environments.
+We then just need to design a thin protocol that communicate between local
Emacs and the other editor.
+Since this protocol communicate only locally, the latency should be
negligible,
+therefore we use a blocking reader/writer lock based synchronization scheme.
+
+** Bridge protocol
+
+ - Reader/writer lock
+ + aquire :: body takes the form =()=
+ + release :: body takes the form =()=
+
+ The rest is mostly analogue to the primary protocol for Emacsen,
+ except that CRDT IDs are replaced by explicit integer position (start from
1, as in Emacs).
+
+ - Text Editing
+ + insert :: body takes the form =(buffer-name position content)=
+ + delete :: body takes the form =(buffer-name position length)=
+
+ - Peer State
+ + cursor :: body takes the form =(buffer-name site-id point-position
mark-position)=
+ =*-position= can be either an integer, or
+ - =nil=, which means clear the point/mark
+
+ + contact :: same as primary protocol.
+
+ + focus :: same as primary protocol.
+
+ - Login
+ Note that we don't include challenge/response authentication mecahnism.
+
+ + hello :: same as primary protocol.
+ + leave :: same as primary protocol.
+
+ + login :: same as primary protocol.
+
+ - Initial Synchronization
+ + sync :: body takes the form =(buffer-name content-string)=
+ + ready :: same as primary protocol.
+
+ - Buffer Service
+ + add :: same as primary protocol.
+ + remove :: same as primary protocol.
+ + get :: same as primary protocol.
- [elpa] externals/crdt updated (4797413 -> c1378c5), ELPA Syncer, 2021/09/09
- [elpa] externals/crdt f9a7ec9 01/18: update header, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt dcf1dd5 02/18: Update version number, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 605d8fa 07/18: initial experiment of xscheme.el integration, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt b6bcc8b 03/18: Merge branch 'master' into development, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt cc37dcd 04/18: add description of bridge protocol,
ELPA Syncer <=
- [elpa] externals/crdt bf1dc5d 09/18: typo, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt e4493e5 13/18: bug fix for comint integration, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 52cbf50 15/18: autoload; fix bug for cmuscheme, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 3f6f566 11/18: lots of changes, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 38476da 05/18: Merge branch 'fix' into development, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt c08e21d 06/18: Refactors and remote command, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 936418c 14/18: Synchronize text property on changes, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt e175d65 08/18: Remote command, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 6b85d8a 10/18: refactor, replace cl-generic with hashtable of handlers, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt d7bc982 12/18: update README, ELPA Syncer, 2021/09/09