<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Concurrency Effects Over Variable-size Identifiers in Distributed Collaborative Editing</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Brice Nédelec</institution>
          ,
          <addr-line>Pascal Molli, Achour Mostefaoui, Emmanuel Desmontils LINA, 2 rue de la Houssinière BP92208, 44322 Nantes Cedex 03</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <volume>1008</volume>
      <issue>40</issue>
      <abstract>
        <p>Distributed collaborative editors such as Google Docs or Etherpad allow to distribute the work across time, space and organizations. In this paper, we focus on distributed collaborative editors based on the Con ict-free Replicated Data Type approach (CRDT). CRDTs encompass a set of well-known data types such as sets, graphs, sequences, etc. CRDTs for sequences model a document as a set of elements (character, line, paragraph, etc.) with unique identi ers, providing two commutative update operations: insert and delete. The identi ers of elements can be either of xed-size or variable-size. Recently, a strategy for assigning variable-size identi ers called LSEQ has been proposed for CRDTs for sequences. LSEQ lowers the space complexity of variable-size identi ers CRDTs from linear to sub-linear. While experiments show that it works locally, it fails to provide this bound with multiple users and latency. In this paper, we propose h-LSEQ, an improvement of LSEQ that preserves its space complexity among multiple collaborators, regardless of the latency. Ultimately, this improvement allows to safely build distributed collaborative editors based on CRDTs. We validate our approach with simulations involving latency and multiple users.</p>
      </abstract>
      <kwd-group>
        <kwd>Distributed Documents</kwd>
        <kwd>Document Authoring Tools and Systems</kwd>
        <kwd>Distributed Collaborative Editing</kwd>
        <kwd>Real-time Editing</kwd>
        <kwd>Con ict-free Replicated Data Types</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Categories and Subject Descriptors</title>
      <p>This work is licensed under the Creative Commons
AttributionShareAlike 3.0 Unported License (CC BY-SA 3.0). To view a copy
of the license, visit http://creativecommons.org/licenses/by-sa/3.0/.</p>
    </sec>
    <sec id="sec-2">
      <title>1. INTRODUCTION</title>
      <p>
        Distributed collaborative editors allow to distribute the
work across space, time and organizations. Some trending
editors such as Google Docs [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] use the Operational
Transform (OT) approach [
        <xref ref-type="bibr" rid="ref14 ref15">14, 15</xref>
        ]. However, an alternative based
on Con ict-free Replicated Data Types (CRDTs) [
        <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
        ]
exists. Compared to OT, CRDTs are more decentralized
and scale better.
      </p>
      <p>
        The CRDTs belong to the optimistic replication [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ]
approach. Therefore, replicas involved in the collaboration
are guaranteed eventual convergence to an identical state.
To provide convergence in a replicated sequence, CRDTs use
unique identi ers to link elements. When the sequence is a
document, the elements can be characters, lines, paragraphs,
etc.
      </p>
      <p>
        We distinguish two types of sequence CRDTs: (i) The
tombstone CRDTs [
        <xref ref-type="bibr" rid="ref1 ref16 ref18 ref19 ref3 ref7 ref8 ref9">1, 3, 7, 8, 9, 16, 18, 19</xref>
        ] use xed-size
identi ers. However, the delete operations only mark and
hide elements to the users. Consequently, these deleted
elements permanently a ect performances. (ii) The
variablesize identi ers CRDTs [
        <xref ref-type="bibr" rid="ref17 ref8">8, 17</xref>
        ] directly encode the order
relation in the identi ers. However, their identi ers can grow
linearly depending on the editing behaviour. Consequently,
they remain unsafe in the distributed collaborative editing
context.
      </p>
      <p>
        To overcome their respective limitations, these approaches
need an additional protocol [
        <xref ref-type="bibr" rid="ref4 ref9">4, 9</xref>
        ] related to garbage
collection mechanisms. Nevertheless, these protocols require
global knowledge over participants. In the general case, such
knowledge remains prohibitively expensive in the context of
distributed networks subject to churn.
      </p>
      <p>
        Recently, LSEQ [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] allowed variable-size identi ers CRDTs
to get rid of this costly additional protocol by lowering their
upper bound on space complexity from linear to sub-linear.
Yet, LSEQ does not guarantee a safe allocation. Indeed, it
uses multiple antagonist strategies which, without any
coordination between collaborators, leads to an quadratic growth
of identi ers.
      </p>
      <p>The contributions of this paper are: (i) experiments that
highlight the negative e ect of multiple users edition on the
size of LSEQ identi ers (ii) experiments that highlight that
an increasing latency does not have a negative impact on
the size of LSEQ identi ers. (iii) an improvement of LSEQ
called h-LSEQ that extends the single user sub-linear upper
bound on space complexity to any number of users,
regardless of the latency, and without any additional cost.</p>
      <p>Ultimately, h-LSEQ allows distributed collaborative
editors to safely use variable-size identi ers CRDTs.</p>
      <p>The rest of the paper is organized as follow: Section 2
details variable-size identi ers CRDTs for sequences, the
allocation strategy LSEQ, and highlights the motivation of this
paper. Section 3 presents h-LSEQ a combination of LSEQ
and a hash-based choice strategy to overcome the LSEQ
limitations. Section 4 shows the results of experiments over
LSEQ and h-LSEQ considering latency and multiple users.
Finally, Section 5 reviews the related works.</p>
    </sec>
    <sec id="sec-3">
      <title>BACKGROUND</title>
      <p>
        Con ict-free Replicated Data Types belong to the
optimistic replication approach [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ]. In the context of
distributed collaborative editing, the replicated data is a
document, where: (1) each insert/delete operation is prepared
locally and broadcast, (2) each remote replica receives and
integrates the changes, (3) all involved replicas eventually
converge to an identical state.
      </p>
      <p>
        To provide the convergence property, CRDTs for sequences
model a document as a set of couples helt; idi where id 2
(I; &lt;id), &lt;id being a strict and dense total order over I,
and elt any element, e.g., a character, a line. Two
commutative operations allow to update the document:
{ insert(p 2 I; elt; q 2 I) that generates an identi er idelt
with p &lt; idelt &lt; q and adds helt; idelti to the document.
{ delete(idelt) that removes helt; idelti from the document.
The variable-size identi ers CRDTs [
        <xref ref-type="bibr" rid="ref17 ref8">8, 17</xref>
        ] de ne
identiers as a series of numbers that can designate paths in a
tree. An allocation strategy is in charge of choosing these
sequences of numbers. It aims to keep these identi ers as
small as possible for the sake of performance.
previously mandatory garbage collecting protocol. Three
aspects de ne LSEQ:
{ base doubling: regarding the underlying tree model,
each node can have twice more children than its
parent. It follows the properties of exponential trees [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
{ two antagonist allocation strategies: boundary+ and
boundary{ that are designed for end-edition and
frontedition respectively.
{ random strategy choice: it randomly assigns an
allocation strategy to each depth of the tree. It follows
the intuition: since we have no prior knowledge of the
editing behaviour, the strategy choice should not favor
any editing behaviour. Consequently, the frequencies of
appearance of each allocation strategy have to be equal.
      </p>
      <p>
        Despite the fact that numerous experiments have been
performed using LSEQ including real documents extracted
from Wikipedia, they did not include any concurrency.
Although, Wikipedia's revisions already present a serialization
of the document without explicit concurrency, experiments
with this type of documents are of great importance [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
1 user (bit/id)
10 users (bit/id)
10
6.5
9.5
#insert operations
100 200 500
26.8 32.7 56.0
125.8 377.0 1962.1
1000
64.2
5468.0
      </p>
      <p>
        De nition 1 from [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] states the alloc function property: a
sub-linear upper-bound on the average bit-length of
identiers. By excluding any reference to the two phases of
optimistic replication operations, it encompasses both the local
generation of identi ers and the integration of remote
operations. According to Table 1, LSEQ only partially answers
the problem statement.
      </p>
      <p>The identi ed problem concerns the preservation of the
space complexity of LSEQ from single user to multiple users
edition. Using multiple antagonist strategies without any
coordination between collaborators leads to a quadratic growth
of identi ers. Consequently, providing a mechanism of
agreement in the choice of strategies would greatly improve LSEQ
as well as any composition of allocation strategies.
Furthermore, such improvement would make variable-size identi ers
CRDTs actually usable in the distributed collaborative
editing context.</p>
      <p>The h-LSEQ allocation strategy is mainly based on LSEQ,
they di er in the strategy choice component. Using LSEQ,
each replica involved in the collaboration makes independent
random choices. However, Section 2 showed that such
strategy fails to provide sub-linearly upper-bounded identi ers in
collaboration involving multiple users.</p>
      <p>The solution is to reach a global agreement over replicas
on which is the allocation strategy used at each depth of the
underlying tree model. Since LSEQ aims to get rid of
protocols related to garbage collecting mechanisms, any solution
that requires additional communication is inconceivable.</p>
      <p>We propose to use a hash strategy choice component which
have the same local behaviour than the original random
strategy choice, but it also provides the required implicit
global agreement. Indeed, instead of synchronizing the set
of users, we provide an a priori agreement by the mean of
a hash function. This agreement avoids the possibility of
antagonist choices which would have led to a bad global
allocation of identi ers. Furthermore, it does not introduce
any additional cost to LSEQ.</p>
      <p>
        Algorithm 1 details the h-LSEQ allocation strategy. The
changes over LSEQ are simply highlighted. This section
explains this algorithm. Extracted from [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], the pre x function
return a copy of the identi er id, i.e., a series of numbers
truncated at depth or increased until depth. The function
carefully encodes each number of this copy in a base
depending on its depth in order to directly apply the arithmetic
operations of line 26 and line 31. For instance, assuming
that the departure base is 25, a call to pref ix([13:42:37]; 2)
encodes [13:42] using 5 + 6 bits.
      </p>
      <p>The functions boundary+ and boundary are two
allocation strategies, note that they do not strictly respect the
alloc function signature in order to factorize the
computation of depth and step.
3.1</p>
    </sec>
    <sec id="sec-4">
      <title>Locally</title>
      <p>The strategy choice function is surjective and its signature
is: h(depth 2 N ) : N. The returned value corresponds to an
allocation strategy unique identi er. The algorithm of the
allocation strategy h-LSEQ follows 3 steps:
1. lines 8-11: computes the depth of the future identi ers
to allocate
2. line 13: calls the strategy choice function h using the
depth
3. line 15: calls the allocation strategy using the identi er
returned by h</p>
      <p>The strategy choice function returns strategy identi ers
following a uniform law. Thus, frequencies of appearance
of each strategy are equal and does not favor any editing
behaviour. Furthermore, the unpredictability due to
randomness preserves the model from intentional and malicious
attacks.</p>
      <p>The hash function ful lls the requirement of the strategy
choice function h. However, contrarily to the random
strategy choice component, it requires an initialization. Indeed,
the creator of the document must share a hidden seed (cf.
line 2) within the document that each collaborator will use
to generate the hash function speci c to this document. In
Algorithm 1 at line 21, we simply use the common random
function initialized with the seed and the depth.
Algorithm 1 h-LSEQ allocation function
1: let boundary := 10
2: let seed := 123456789</p>
      <sec id="sec-4-1">
        <title>Any constant</title>
        <p>Init with document
3: let S := fh0; boundary+i; h1; boundary ig;
4: map&lt;id, allocation strategy&gt;
5:
6: function alloc(p, q 2 I)
7: let depth := 0; interval := 0;
8: while (interval &lt; 1) do Not enough for 1 insert
9: depth + +;
10: interval := pref ix(q; depth) pref ix(p; depth) 1;
11: end while
12: let step := min(boundary; interval);
maximum step to stay between p and q</p>
        <p>let idStrat := h(depth);
13:
14: Call the hash function
15: let id := S:get(idStrat):invoke(p; q; depth; step);
16: Call the allocation strategy according to hash
17: return id;
18: end function
19:
20: function h ( depth 2 N )
Process the
21:</p>
        <p>return Random(seed depth):nextInt(0; 1);
22: end function
23:
24: function boundary+(p, q 2 I, depth, step 2 N )
25: let addV al := RandInt(0; step) + 1;
26: return pref ix(p; depth) + addV al;
27: end function
28:
29: function boundary{(p, q 2 I, depth, step 2 N )
30: let subV al := RandInt(0; step) + 1;
31: return pref ix(q; depth) subV al;
32: end function
33:
34: function prefix(id 2 I, depth 2 N )
35: let idCopy := [ ];
36: for (cpt := 1 to depth) do
37: if (cpt &lt; id:size) then Copy the value
38: idCopy := idCopy:append(id:at(cpt));
39: else Add 0 encoded in the right base
40: idCopy := idCopy:append(0base(cpt));
41: end if
42: end for
43: return idCopy;
44: end function
3.2</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Remotely</title>
      <p>Each collaborator generates the same hash function thanks
to the shared seed. Also, all collaborators use the same
mapping id ! allocation strategy (cf. line 3). Consequently, all
hash functions map the same depth to the same allocation
strategies. The idea is to reach a consensus on which
strategies to employ in order to avoid the waste of identi ers' space
due to the choice of antagonist strategies.</p>
      <p>Figure 2 highlights the di erences between the original
random strategy choice and our hash strategy choice. Both
cases present two collaborators inserting 2 elements one
after the other. The expected result is the sequence \abcd".
Hence, Collaborator 1 generates the \a" and \c" and
Collaborator 2 generates the \b" and \d". In both cases they draw
the same numbers. However, in the case of random strategy
choice, one collaborator randomly chooses boundary+ twice
while the other randomly chooses boundary{ twice. When
the editing behaviour is monotonic, the size of identi ers</p>
      <sec id="sec-5-1">
        <title>LSEQ h-LSEQ</title>
        <p>
          9
30
quickly grows. On the opposite, the collaborators using
hLSEQ implicitly agree on using boundary+ at depth-1,
consequently the allocation follows the properties of the one
user edition presented in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
        </p>
        <p>The next section aims to corroborate our assumptions by
performing experiments on di erent setups with varying the
number of collaborators and the latency of the network.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>EXPERIMENTS</title>
      <p>This section is composed of two parts. First, the
experimentation focuses on the in uence of the number of
collaborators on the size of LSEQ and h-LSEQ identi ers. A set
of synthetic collaborators generates a document by
successively performing insert operations at the end. This
experiment aims to show the behaviour of the two strategy choices,
and compare the results with the expected sub-linear space
complexity.</p>
      <p>The second part of experiments consists in highlighting
the e ect of latency on a document edited by multiple users.
Once again, it aims to compare LSEQ and h-LSEQ and
to show the impact of concurrency on the average size of
identi ers in the document.</p>
      <p>The experiments focus on the digit bit-length of generated
identi ers. Indeed, all variable-size CRDTs rely on source
and clock to guarantee the unicity of identi ers,
nevertheless, the space complexity mainly depends on the digit choice
made by the allocation strategy.</p>
      <p>To perform these experiments, we implemented a
simulation framework called HumbleSimulator. The sources are
available on the Github platform under the terms of the
GPL licence 1.
4.1</p>
    </sec>
    <sec id="sec-7">
      <title>Multiple users experiment</title>
      <p>Objective: show that the random strategy choice
without taking into account the strategies employed by other
collaborators leads to a quick growth in the size of
identiers. On the opposite, when all collaborators uses a common
allocation strategy at a given depth, the space complexity
remains sub-linearly upper-bounded.</p>
      <p>Description: we evaluate LSEQ and h-LSEQ strategies
on a group of 10 collaborators. Thus, the setups are (i) a
random strategy choice (rand) and (ii) a hash strategy choice
1. https://github.com/Chat-Wane/HumbleSimulator
revision
250 LSEQ+rand
200 LSEQ+hash
tghn 150
e
litbd 100
i
50
(hash). Both of these setups use boundary+ and boundary{
and have the same variable values boundary = 10 and base =
24+depth. A set of 10 collaborators produces a document of
100 lines by performing 10 insert operations each.</p>
      <p>
        Results: Figure 3 shows on the top part the spectrum of
the synthetic document, i.e., the revision date of each line.
Since the bars are getting taller when they are closer of the
end of the document, it indicates that the users edited at
the end monotonically. On the second part of the Figure 3,
it shows the identi er bit-length associated to each line. We
observe that the identi ers of rand setup quickly increase
while the hash identi ers remain similar to the ones in the
experiment made for one user in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Consequently, the hash
setup is the most suitable setup in the context of distributed
collaborative editing.
      </p>
      <p>Reasons: both setups use boundary+ and boundary{
allocation strategies. However, each collaborator in the rand
setup makes independent choices of allocation strategies when
required. Thus, if a collaborator chooses a particular
strategy, and another user chooses the antagonist strategy, then
a large number of identi ers is wasted when their operations
are delivered to each other. On the other hand, when the
same hash function spread over all collaborators generates
the same strategy choices, it keeps the random behaviour
locally and also makes an implicit agreement on which strategy
to employ at any given depth.
4.2</p>
    </sec>
    <sec id="sec-8">
      <title>Latency experiment</title>
      <p>Objective: show that increasing the latency, i.e., the
time between the generation and the delivery of an
operation, does not imply a growth in the size of identi ers. On
the contrary, when the latency increases, the average size of
allocated identi ers decreases. This behaviour is expected
for LSEQ and h-LSEQ strategies.</p>
      <p>Description: we simulate the production of a 100 lines
document by a set of 10 collaborators. Each one of these
collaborators performs 10 insert operations at the end of the
LSEQ+rand
LSEQ+hash
100
200
300
400
500
600</p>
      <p>700
latency
document. The users generate operations following the
Poisson distribution of parameter = 100, i.e., users more likely
generate an operation after 100 rounds (arbitrary unit) from
their previous operation. Measurements are done at a
latency of 5, 10, 20, 40, 80, 160, 320, 640 rounds. They concern
the average bit-length of identi ers in the document. We
evaluate two setups: the random strategy choice (rand) and
the hash strategy choice (hash). Both setups use the
allocation strategies boundary+ and boundary with boundary =
10 and departure base = 24+depth.</p>
      <p>Results: Figure 4 shows the results of the latency
experiments. As expected, the two setups allocate identi ers
with an average bit-length that quickly decreases when the
latency increases. Therefore, the latency does not badly
a ect LSEQ and h-LSEQ allocation strategies. Also, it
conrms observations made in the previous experiment: hash
performs better than rand, especially under low latency.</p>
      <p>Reasons: increasing the latency delays the arrival of
operations to the remote collaborators. Thus, each
collaborator works locally until operations generated by other users
are delivered. Considering the extreme case with the
maximum latency, each collaborator generates his 10 insertions,
and then merges the others' 90 operations. Consequently,
the 100 operations share the same space, i.e., the digit part
of identi ers can be the same for multiple elements, and the
total order is maintained by the source and clock.
4.3</p>
    </sec>
    <sec id="sec-9">
      <title>Synthesis</title>
      <p>The experiments evaluated the e ect of concurrency on
the average bit-length of identi ers by varying the number
of collaborators and the latency. They showed that an
implicit and a priori agreement on allocation strategy choice
is required to maintain the sub-linear upper-bound on space
complexity. Employing the same hash function to choose the
allocation strategy permits to reach this agreement.
Consequently, the improvement of LSEQ called h-LSEQ can be
safely used in distributed collaborative editing. The latency
experiment shows that increasing the latency parameter only
results in sharing the identi er space, and consequently
lowers the size of identi ers. As a corollary, considering an
immediate delivery of operations constitutes an upper-bound
on the behaviour of the overall system for any latency.
5.</p>
    </sec>
    <sec id="sec-10">
      <title>RELATED WORK</title>
      <p>
        Current distributed collaborative editors use optimistic
replication [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ] to provide availability of data at a
consistency cost. Optimistic replication designs operations in
two phases. First a replica prepares the result of an
operation and then broadcasts it to other collaborators. Second,
remote replicas integrate the newly received data.
      </p>
      <p>Operational Transform approach (OT) and Con ict-free
Replicated Data Type approach (CRDT) belong to the
optimistic class of replication. While CRDTs share the
computational cost of operations between the local and remote
parts of the replication protocol, the OT approaches prefer
to o er free local generation and pay an additional cost on
the integration of remote operations. Since the number of
remote operations quadratically grows when the number of
collaborators increases, the CRDTs scale better than OT
approaches.</p>
      <p>
        We distinguish two classes of CRDTs for sequences. The
tombstone based CRDT approaches use death certi cate on
removed elements. Henceforth, these elements are hidden
to the users, but still remain in the underlying model and
undermine the performance. For instance, the number of
tombstones in popular or controversial pages in Wikipedia
pages would be very high due to vandalism and recoveries.
The representatives of this class of CRDTs are WOOT [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ],
WOOTO [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], WOOTH [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], CT [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], Treedoc [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], PPS [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ],
RGA [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
      <p>
        To get rid of these marked elements, the tombstone based
CRDTs require additional protocols related to garbage
collecting mechanisms. In [
        <xref ref-type="bibr" rid="ref4 ref9">4, 9</xref>
        ] they propose approaches to
safely purge the tombstones. However, it requires a global
knowledge over collaborators. In [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], they describe an
approach that obtains the global knowledge by maintaining a
vector clock with one entry per participant although it is
too costly in large distributed network where collaborators
can enter and leave the system. In [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], they describe the
core nebula approach that permits to reach the consensus
over participants. However, this approach constrains the
network topology to make the consensus reachable and uses
a costly catch up protocol.
      </p>
      <p>
        The alternative to tombstones is the variable-size
identiers CRDT approach. These CRDTs directly encode the
total order of elements into their unique identi ers. Thus,
they do not require tombstones. However, the identi ers
can grow. In Logoot [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] and Treedoc [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], identi ers have
a linear space complexity compared to the number of
insert operations. Furthermore, their size heavily depends on
the position of insertions. For example, performing
insertions repetitively at the beginning of a document leads to
identi ers with a size equals to the number of insert
operations. Consequently, such approaches require an additional
re-balance protocol, like tombstone CRDTs. However, their
underlying allocation strategies can be replaced by LSEQ [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
that provides a sub-linear upper-bound on the space
complexity regardless of the editing behaviour.
      </p>
      <p>
        The LSEQ approach uses two antagonist allocation
strategies. Although paper [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] argues about the importance of
concurrency in CRDTs experiments, the original paper of LSEQ
does not consider this aspect. In this paper, we showed
on synthetic documents that its original con guration does
not scale in the number of users. The added value of
synthetic documents over real collaborative documents is the
total exibility on their parameters, especially on the
editing behaviour. Indeed, the number of available real
collaborative documents (including concurrency) is very limited.
Moreover, such experiments are costly to set up, and often
biased by the nature of the task to perform.
      </p>
      <p>In this paper, we propose to replace the random strategy
choice component of LSEQ by a hash-based choice strategy
to reach an implicit consensus on which strategy to employ.
This con guration called h-LSEQ, does not require
additional computation and extends the sub-linear complexity
bound of LSEQ from a single user to multiple collaborators
regardless of the latency. Thus, h-LSEQ constitutes a safe
allocation strategy for sequences CRDTs, even in concurrent
cases.</p>
    </sec>
    <sec id="sec-11">
      <title>CONCLUSION</title>
      <p>In this paper, we presented an improvement of the
allocation strategy LSEQ called h-LSEQ. Contrarily to the
original approach, our con guration supports multiple users
regardless of the latency. Indeed, replacing the random
strategy choice by the hash-based choice strategy allows to reach
a global sub-linear upper-bound on space complexity. As a
consequence, distributed collaborative editors can safely use
h-LSEQ and show better scalability than current trending
editors such as Google Docs, Etherpad, etc.</p>
      <p>The hash-based choice strategy is a common function over
participants that maps a depth in the underlying tree to an
allocation strategy identi er. This surjective function
initialized with a shared seed allows to reach an agreement
on strategies with no additional synchronization cost.
Consequently, there is no loss in the identi ers' space due to
antagonist allocation strategies.</p>
      <p>This paper highlights the importance of multiple users
analysis in CRDTs for sequences, particularly in the case of
multiple underlying allocation strategies. We also showed
that latency does not badly a ect the size of identi ers in
variable-size identi ers CRDTs. However, we performed
experiments with synthetic documents in order to show the
general behaviour of the allocation without considering
semantically consistent documents.</p>
      <p>Future works include the formal proof of the sub-linear
upper-bound on space complexity of h-LSEQ. A probability
analysis of the worst-case scenario is mandatory to show that
it seldom happens. We plan to experiment h-LSEQ on a
corpus of real documents including multiple collaborators and
concurrency. Finally, we aim to build a real distributed
collaborative editor based on a variable-size identi ers CRDT
using h-LSEQ as allocation strategy.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ahmed-Nacer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.-L.</given-names>
            <surname>Ignat</surname>
          </string-name>
          , G. Oster, H.-G. Roh, and
          <string-name>
            <given-names>P.</given-names>
            <surname>Urso</surname>
          </string-name>
          .
          <article-title>Evaluating CRDTs for Real-time Document Editing</article-title>
          . In ACM, editor,
          <source>11th ACM Symposium on Document Engineering</source>
          , pages
          <volume>103</volume>
          {
          <fpage>112</fpage>
          ,
          <string-name>
            <surname>Mountain</surname>
            <given-names>View</given-names>
          </string-name>
          , California, Etats-Unis,
          <year>Sept</year>
          .
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Andersson</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Thorup</surname>
          </string-name>
          .
          <article-title>Dynamic ordered sets with exponential search trees</article-title>
          .
          <source>J. ACM</source>
          ,
          <volume>54</volume>
          (
          <issue>3</issue>
          ),
          <year>June 2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>V.</given-names>
            <surname>Grishchenko</surname>
          </string-name>
          .
          <article-title>Deep hypertext with embedded revision control implemented in regular expressions</article-title>
          .
          <source>In Proceedings of the 6th International Symposium on Wikis and Open Collaboration</source>
          ,
          <source>WikiSym '10</source>
          , pages
          <issue>3:1</issue>
          {3:
          <fpage>10</fpage>
          , New York, NY, USA,
          <year>2010</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M.</given-names>
            <surname>Letia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Preguica</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Shapiro</surname>
          </string-name>
          .
          <article-title>Crdts: Consistency without concurrency control</article-title>
          .
          <source>Arxiv preprint arXiv:0907.0929</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D. A.</given-names>
            <surname>Nichols</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Curtis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dixon</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Lamping</surname>
          </string-name>
          .
          <article-title>High-latency, low-bandwidth windowing in the jupiter collaboration system</article-title>
          .
          <source>In Proceedings of the 8th annual ACM symposium on User interface and software technology</source>
          , pages
          <volume>111</volume>
          {
          <fpage>120</fpage>
          . ACM,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>B.</given-names>
            <surname>Nedelec</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Molli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mostefaoui</surname>
          </string-name>
          , and
          <string-name>
            <surname>E. Desmontils.</surname>
          </string-name>
          <article-title>LSEQ: an Adaptive Structure for Sequences in Distributed Collaborative Editing</article-title>
          . In ACM, editor,
          <source>13th ACM Symposium on Document Engineering</source>
          , Sept.
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>G.</given-names>
            <surname>Oster</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Urso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Molli</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Imine</surname>
          </string-name>
          .
          <article-title>Data consistency for p2p collaborative editing</article-title>
          .
          <source>In Proceedings of the 2006 20th anniversary conference on Computer supported cooperative work</source>
          , pages
          <volume>259</volume>
          {
          <fpage>268</fpage>
          . ACM,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>N.</given-names>
            <surname>Preguica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Marques</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Shapiro</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Letia</surname>
          </string-name>
          .
          <article-title>A commutative replicated data type for cooperative editing</article-title>
          .
          <source>In Distributed Computing Systems</source>
          ,
          <year>2009</year>
          . ICDCS'
          <volume>09</volume>
          . 29th IEEE International Conference on, pages
          <volume>395</volume>
          {
          <fpage>403</fpage>
          .
          <string-name>
            <surname>Ieee</surname>
          </string-name>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>H.-G.</given-names>
            <surname>Roh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Jeon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-S.</given-names>
            <surname>Kim</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Lee</surname>
          </string-name>
          .
          <article-title>Replicated abstract data types: Building blocks for collaborative applications</article-title>
          .
          <source>Journal of Parallel and Distributed Computing</source>
          ,
          <volume>71</volume>
          (
          <issue>3</issue>
          ):
          <volume>354</volume>
          {
          <fpage>368</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Saito</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Shapiro</surname>
          </string-name>
          .
          <source>Replication: Optimistic Approaches. technical report</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Saito</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Shapiro</surname>
          </string-name>
          .
          <article-title>Optimistic replication</article-title>
          .
          <source>ACM Comput. Surv.</source>
          ,
          <volume>37</volume>
          (
          <issue>1</issue>
          ):
          <volume>42</volume>
          {
          <fpage>81</fpage>
          ,
          <string-name>
            <surname>Mar</surname>
          </string-name>
          .
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>M.</given-names>
            <surname>Shapiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Preguica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Baquero</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Zawirski</surname>
          </string-name>
          .
          <article-title>A comprehensive study of Convergent and Commutative Replicated Data Types</article-title>
          . Rapport de recherche RR-7506, INRIA, Jan.
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>M.</given-names>
            <surname>Shapiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Preguica</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Baquero</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Zawirski</surname>
          </string-name>
          .
          <article-title>Con ict-free replicated data types</article-title>
          .
          <source>Stabilization, Safety, and Security of Distributed Systems</source>
          , pages
          <fpage>386</fpage>
          {
          <fpage>400</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>C.</given-names>
            <surname>Sun</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Ellis</surname>
          </string-name>
          .
          <article-title>Operational transformation in real-time group editors: issues, algorithms, and achievements</article-title>
          .
          <source>In Proceedings of the 1998 ACM conference on Computer supported cooperative work</source>
          ,
          <source>CSCW '98</source>
          , pages
          <fpage>59</fpage>
          {
          <fpage>68</fpage>
          , New York, NY, USA,
          <year>1998</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>C.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Jia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Chen</surname>
          </string-name>
          .
          <article-title>Achieving convergence, causality preservation, and intention preservation in real-time cooperative editing systems</article-title>
          .
          <source>ACM Transactions on Computer-Human Interaction (TOCHI)</source>
          ,
          <volume>5</volume>
          (
          <issue>1</issue>
          ):
          <volume>63</volume>
          {
          <fpage>108</fpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>S.</given-names>
            <surname>Weiss</surname>
          </string-name>
          , P. Urso, and
          <string-name>
            <given-names>P.</given-names>
            <surname>Molli</surname>
          </string-name>
          .
          <article-title>Wooki: A p2p wiki-based collaborative writing tool</article-title>
          . In B.
          <string-name>
            <surname>Benatallah</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Casati</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Georgakopoulos</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Bartolini</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          <string-name>
            <surname>Sadiq</surname>
          </string-name>
          , and C. Godart, editors,
          <source>Web Information Systems Engineering { WISE</source>
          <year>2007</year>
          , volume
          <volume>4831</volume>
          of Lecture Notes in Computer Science, pages
          <volume>503</volume>
          {
          <fpage>512</fpage>
          . Springer Berlin Heidelberg,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>S.</given-names>
            <surname>Weiss</surname>
          </string-name>
          , P. Urso, and
          <string-name>
            <given-names>P.</given-names>
            <surname>Molli</surname>
          </string-name>
          .
          <article-title>Logoot: a scalable optimistic replication algorithm for collaborative editing on p2p networks</article-title>
          .
          <source>In Distributed Computing Systems</source>
          ,
          <year>2009</year>
          . ICDCS'
          <volume>09</volume>
          . 29th IEEE International Conference on, pages
          <volume>404</volume>
          {
          <fpage>412</fpage>
          . IEEE,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>Q.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Pu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Ferreira</surname>
          </string-name>
          .
          <article-title>A partial persistent data structure to support consistency in real-time collaborative editing</article-title>
          .
          <source>In Data Engineering (ICDE)</source>
          ,
          <year>2010</year>
          IEEE 26th International Conference on, pages
          <volume>776</volume>
          {
          <fpage>779</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>W.</given-names>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>A string-wise crdt for group editing</article-title>
          .
          <source>In Proceedings of the 17th ACM international conference on Supporting group work</source>
          ,
          <source>GROUP '12</source>
          , pages
          <fpage>141</fpage>
          {
          <fpage>144</fpage>
          , New York, NY, USA,
          <year>2012</year>
          . ACM.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>