@@ -6,7 +6,7 @@ This packages implements the Logoot split algorithm
~André, Luc, et al. "Supporting adaptable granularity of changes for massive-scale collaborative editing." 9th IEEE International Conference on Collaborative Computing: Networking, Applications and Worksharing. IEEE, 2013.~
The CRDT-ID blocks are implemented by text property ='crdt-id=.
A continous range of text with the same ='crdt-id'= property represent a CRDT-ID block.
A continous range of text with the same ='crdt-id= property represent a CRDT-ID block.
The ='crdt-id= is a a cons of =(ID-STRING . END-OF-BLOCK-P)=,
where =ID-STRING= represent the CRDT-ID of the leftmost character in the block.
If =END-OF-BLOCK-P= is =NIL=, the block is a non-rightmost segment splitted from a larger block,
...
...
@@ -14,20 +14,36 @@ so insertion at the right of this block shouldn't be merged into the block by sh
=ID-STRING= is a unibyte string representing a CRDT-ID (for efficient comparison).
Every two bytes represent a big endian encoded integer.
For base IDs, last two bytes are always representing site ID.
For base IDs, last two bytes are always representing Site ID.
Stored strings are BASE-ID:OFFSETs. So the last two bytes represent offset,
and second last two bytes represent site ID.
and second last two bytes represent Site ID.
* Access Control
~crdt.el~ implements a capability based access control system.
Each capability is a list of the form =(type transferable-p nonce . body)=
- read :: body takes the form =(buffer-name)=
- write :: body takes the form =(buffer-name)=
- command :: body takes the form =(buffer-name command-symbol)=
+ =buffer-name= can be =t=, which means that =command-symbol= is not
bound to be invoked in any specific buffer.
- process :: body takes the form =(buffer-name)=
* Protocol
Text-based version
(it should be easy to migrate to a binary version. Using text for better debugging for now)
Text-based version
(it should be easy to migrate to a binary version. Using text for better debugging for now)
Note: Starting from =v0.3.0=, we separate /User IDs/ and /Site IDs/.
Site IDs are /buffer local/ and temporarily assigned to users with writable access.
Every message takes the form =(type . body)=
Every message takes the form =(type . body)=
- Text Editing
+ insert ::
body takes the form =(buffer-name crdt-id position-hint content)=
body takes the form =(buffer-name user-id crdt-id position-hint content)=
- =position-hint= is the buffer position where the operation happens at the site
which generates the operation. Then we can play the trick that start search
near this position at other sites to speedup CRDT ID search
...
...
@@ -40,18 +56,18 @@ and second last two bytes represent site ID.