<s>
In	O
distributed	B-Architecture
computing	I-Architecture
,	O
a	O
conflict-free	B-Operating_System
replicated	I-Operating_System
data	I-Operating_System
type	I-Operating_System
(	O
CRDT	B-Operating_System
)	O
is	O
a	O
data	B-General_Concept
structure	I-General_Concept
that	O
is	O
replicated	B-Architecture
across	O
multiple	O
computers	O
in	O
a	O
network	B-Architecture
,	O
with	O
the	O
following	O
features	O
:	O
</s>
<s>
The	O
application	O
can	O
update	O
any	O
replica	B-Architecture
independently	O
,	O
concurrently	B-Architecture
and	O
without	O
coordinating	B-Operating_System
with	O
other	O
replicas	B-Architecture
.	O
</s>
<s>
An	O
algorithm	O
(	O
itself	O
part	O
of	O
the	O
data	O
type	O
)	O
automatically	O
resolves	O
any	O
inconsistencies	B-General_Concept
that	O
might	O
occur	O
.	O
</s>
<s>
Although	O
replicas	B-Architecture
may	O
have	O
different	O
state	O
at	O
any	O
particular	O
point	O
in	O
time	O
,	O
they	O
are	O
guaranteed	O
to	O
eventually	B-General_Concept
converge	O
.	O
</s>
<s>
The	O
CRDT	B-Operating_System
concept	O
was	O
formally	O
defined	O
in	O
2011	O
by	O
Marc	O
Shapiro	O
,	O
Nuno	O
Preguiça	O
,	O
Carlos	O
Baquero	O
and	O
Marek	O
Zawirski	O
.	O
</s>
<s>
Development	O
was	O
initially	O
motivated	O
by	O
collaborative	B-Application
text	I-Application
editing	I-Application
and	O
mobile	O
computing	O
.	O
</s>
<s>
CRDTs	B-Operating_System
have	O
also	O
been	O
used	O
in	O
online	B-Protocol
chat	I-Protocol
systems	O
,	O
online	O
gambling	O
,	O
and	O
in	O
the	O
SoundCloud	O
audio	O
distribution	O
platform	O
.	O
</s>
<s>
The	O
NoSQL	B-General_Concept
distributed	B-Application
databases	I-Application
Redis	B-Operating_System
,	O
Riak	B-General_Concept
and	O
Cosmos	B-Application
DB	I-Application
have	O
CRDT	B-Operating_System
data	O
types	O
.	O
</s>
<s>
Concurrent	O
updates	O
to	O
multiple	O
replicas	B-Architecture
of	O
the	O
same	O
data	O
,	O
without	O
coordination	O
between	O
the	O
computers	O
hosting	O
the	O
replicas	B-Architecture
,	O
can	O
result	O
in	O
inconsistencies	B-General_Concept
between	O
the	O
replicas	B-Architecture
,	O
which	O
in	O
the	O
general	O
case	O
may	O
not	O
be	O
resolvable	O
.	O
</s>
<s>
Restoring	O
consistency	B-General_Concept
and	O
data	O
integrity	O
when	O
there	O
are	O
conflicts	O
between	O
updates	O
may	O
require	O
some	O
or	O
all	O
of	O
the	O
updates	O
to	O
be	O
entirely	O
or	O
partially	O
dropped	O
.	O
</s>
<s>
Accordingly	O
,	O
much	O
of	O
distributed	B-Architecture
computing	I-Architecture
focuses	O
on	O
the	O
problem	O
of	O
how	O
to	O
prevent	O
concurrent	O
updates	O
to	O
replicated	B-Architecture
data	O
.	O
</s>
<s>
But	O
another	O
possible	O
approach	O
is	O
optimistic	B-General_Concept
replication	I-General_Concept
,	O
where	O
all	O
concurrent	O
updates	O
are	O
allowed	O
to	O
go	O
through	O
,	O
with	O
inconsistencies	B-General_Concept
possibly	O
created	O
,	O
and	O
the	O
results	O
are	O
merged	O
or	O
"	O
resolved	O
"	O
later	O
.	O
</s>
<s>
In	O
this	O
approach	O
,	O
consistency	B-General_Concept
between	O
the	O
replicas	B-Architecture
is	O
eventually	B-General_Concept
re-established	O
via	O
"	O
merges	O
"	O
of	O
differing	O
replicas	B-Architecture
.	O
</s>
<s>
While	O
optimistic	B-General_Concept
replication	I-General_Concept
might	O
not	O
work	O
in	O
the	O
general	O
case	O
,	O
there	O
is	O
a	O
significant	O
and	O
practically	O
useful	O
class	O
of	O
data	B-General_Concept
structures	I-General_Concept
,	O
CRDTs	B-Operating_System
,	O
where	O
it	O
does	O
work	O
where	O
it	O
is	O
always	O
possible	O
to	O
merge	O
or	O
resolve	O
concurrent	O
updates	O
on	O
different	O
replicas	B-Architecture
of	O
the	O
data	B-General_Concept
structure	I-General_Concept
without	O
conflicts	O
.	O
</s>
<s>
This	O
makes	O
CRDTs	B-Operating_System
ideal	O
for	O
optimistic	B-General_Concept
replication	I-General_Concept
.	O
</s>
<s>
As	O
an	O
example	O
,	O
a	O
one-way	O
Boolean	O
event	O
flag	O
is	O
a	O
trivial	O
CRDT	B-Operating_System
:	O
one	O
bit	O
,	O
with	O
a	O
value	O
of	O
true	O
or	O
false	O
.	O
</s>
<s>
The	O
resolution	O
method	O
is	O
"	O
true	O
wins	O
"	O
:	O
when	O
merging	O
a	O
replica	B-Architecture
where	O
the	O
flag	O
is	O
true	O
(	O
that	O
replica	B-Architecture
has	O
observed	O
the	O
event	O
)	O
,	O
and	O
another	O
one	O
where	O
the	O
flag	O
is	O
false	O
(	O
that	O
replica	B-Architecture
has	O
n't	O
observed	O
the	O
event	O
)	O
,	O
the	O
resolved	O
result	O
is	O
true	O
the	O
event	O
has	O
been	O
observed	O
.	O
</s>
<s>
There	O
are	O
two	O
approaches	O
to	O
CRDTs	B-Operating_System
,	O
both	O
of	O
which	O
can	O
provide	O
strong	B-General_Concept
eventual	B-General_Concept
consistency	I-General_Concept
:	O
operation-based	O
CRDTs	B-Operating_System
and	O
state-based	O
CRDTs	B-Operating_System
.	O
</s>
<s>
State-based	O
CRDTs	B-Operating_System
are	O
often	O
simpler	O
to	O
design	O
and	O
to	O
implement	O
;	O
their	O
only	O
requirement	O
from	O
the	O
communication	O
substrate	O
is	O
some	O
kind	O
of	O
gossip	B-Operating_System
protocol	I-Operating_System
.	O
</s>
<s>
Their	O
drawback	O
is	O
that	O
the	O
entire	O
state	O
of	O
every	O
CRDT	B-Operating_System
must	O
be	O
transmitted	O
eventually	B-General_Concept
to	O
every	O
other	O
replica	B-Architecture
,	O
which	O
may	O
be	O
costly	O
.	O
</s>
<s>
In	O
contrast	O
,	O
operation-based	O
CRDTs	B-Operating_System
transmit	O
only	O
the	O
update	O
operations	O
,	O
which	O
are	O
typically	O
small	O
.	O
</s>
<s>
However	O
,	O
operation-based	O
CRDTs	B-Operating_System
require	O
guarantees	O
from	O
the	O
communication	O
middleware	O
;	O
that	O
the	O
operations	O
are	O
not	O
dropped	O
or	O
duplicated	O
when	O
transmitted	O
to	O
the	O
other	O
replicas	B-Architecture
,	O
and	O
that	O
they	O
are	O
delivered	O
in	O
causal	O
order	O
.	O
</s>
<s>
Operation-based	O
CRDTs	B-Operating_System
are	O
also	O
called	O
commutative	O
replicated	B-Architecture
data	O
types	O
,	O
or	O
CmRDTs	O
.	O
</s>
<s>
CmRDT	O
replicas	B-Architecture
propagate	O
state	O
by	O
transmitting	O
only	O
the	O
update	O
operation	O
.	O
</s>
<s>
Replicas	B-Architecture
receive	O
the	O
updates	O
and	O
apply	O
them	O
locally	O
.	O
</s>
<s>
The	O
communications	O
infrastructure	O
must	O
therefore	O
ensure	O
that	O
all	O
operations	O
on	O
a	O
replica	B-Architecture
are	O
delivered	O
to	O
the	O
other	O
replicas	B-Architecture
,	O
without	O
duplication	O
,	O
but	O
in	O
any	O
order	O
.	O
</s>
<s>
Pure	O
operation-based	O
CRDTs	B-Operating_System
are	O
a	O
variant	O
of	O
operation-based	O
CRDTs	B-Operating_System
that	O
reduces	O
the	O
metadata	O
size	O
.	O
</s>
<s>
State-based	O
CRDTs	B-Operating_System
are	O
called	O
convergent	O
replicated	B-Architecture
data	O
types	O
,	O
or	O
CvRDTs	O
.	O
</s>
<s>
In	O
contrast	O
to	O
CmRDTs	O
,	O
CvRDTs	O
send	O
their	O
full	O
local	O
state	O
to	O
other	O
replicas	B-Architecture
,	O
where	O
the	O
states	O
are	O
merged	O
by	O
a	O
function	O
which	O
must	O
be	O
commutative	O
,	O
associative	O
,	O
and	O
idempotent	O
.	O
</s>
<s>
The	O
merge	O
function	O
provides	O
a	O
join	O
for	O
any	O
pair	O
of	O
replica	B-Architecture
states	O
,	O
so	O
the	O
set	O
of	O
all	O
states	O
forms	O
a	O
semilattice	O
.	O
</s>
<s>
Delta	O
state	O
CRDTs	B-Operating_System
(	O
or	O
simply	O
Delta	O
CRDTs	B-Operating_System
)	O
are	O
optimized	O
state-based	O
CRDTs	B-Operating_System
where	O
only	O
recently	O
applied	O
changes	O
to	O
a	O
state	O
are	O
disseminated	O
instead	O
of	O
the	O
entire	O
state	O
.	O
</s>
<s>
While	O
CmRDTs	O
place	O
more	O
requirements	O
on	O
the	O
protocol	O
for	O
transmitting	O
operations	O
between	O
replicas	B-Architecture
,	O
they	O
use	O
less	O
bandwidth	O
than	O
CvRDTs	O
when	O
the	O
number	O
of	O
transactions	O
is	O
small	O
in	O
comparison	O
to	O
the	O
size	O
of	O
internal	O
state	O
.	O
</s>
<s>
However	O
,	O
since	O
the	O
CvRDT	O
merge	O
function	O
is	O
associative	O
,	O
merging	O
with	O
the	O
state	O
of	O
some	O
replica	B-Architecture
yields	O
all	O
previous	O
updates	O
to	O
that	O
replica	B-Architecture
.	O
</s>
<s>
Gossip	B-Operating_System
protocols	I-Operating_System
work	O
well	O
for	O
propagating	O
CvRDT	O
state	O
to	O
other	O
replicas	B-Architecture
while	O
reducing	O
network	B-Architecture
use	O
and	O
handling	O
topology	O
changes	O
.	O
</s>
<s>
Some	O
lower	O
bounds	O
on	O
the	O
storage	O
complexity	O
of	O
state-based	O
CRDTs	B-Operating_System
are	O
known	O
.	O
</s>
<s>
This	O
is	O
thus	O
a	O
correctly-defined	O
CvRDT	O
and	O
will	O
provide	O
strong	B-General_Concept
eventual	B-General_Concept
consistency	I-General_Concept
.	O
</s>
<s>
A	O
common	O
strategy	O
in	O
CRDT	B-Operating_System
development	O
is	O
to	O
combine	O
multiple	O
CRDTs	B-Operating_System
to	O
make	O
a	O
more	O
complex	O
CRDT	B-Operating_System
.	O
</s>
<s>
Note	O
that	O
the	O
CRDT	B-Operating_System
's	O
internal	O
state	O
must	O
increase	O
monotonically	O
,	O
even	O
though	O
its	O
external	O
state	O
as	O
exposed	O
through	O
query	O
can	O
return	O
to	O
previous	O
values	O
.	O
</s>
<s>
Merging	O
two	O
replicas	B-Architecture
of	O
the	O
LWW-Element-Set	O
consists	O
of	O
taking	O
the	O
union	O
of	O
the	O
add	O
sets	O
and	O
the	O
union	O
of	O
the	O
remove	O
sets	O
.	O
</s>
<s>
The	O
optimization	O
is	O
achieved	O
by	O
maintaining	O
a	O
vector	O
of	O
timestamps	O
for	O
each	O
replica	B-Architecture
.	O
</s>
<s>
A	O
sequence	O
,	O
list	O
,	O
or	O
ordered	O
set	O
CRDT	B-Operating_System
can	O
be	O
used	O
to	O
build	O
a	O
Collaborative	B-Application
real-time	I-Application
editor	I-Application
,	O
as	O
an	O
alternative	O
to	O
Operational	B-Operating_System
transformation	I-Operating_System
(	O
OT	O
)	O
.	O
</s>
<s>
Some	O
known	O
Sequence	O
CRDTs	B-Operating_System
are	O
Treedoc	O
,	O
</s>
<s>
CRATE	O
is	O
a	O
decentralized	O
real-time	O
editor	O
built	O
on	O
top	O
of	O
LSEQSplit	O
(	O
an	O
extension	O
of	O
LSEQ	O
)	O
and	O
runnable	O
on	O
a	O
network	B-Architecture
of	O
browsers	O
using	O
WebRTC	B-Protocol
.	O
</s>
<s>
LogootSplit	O
was	O
proposed	O
as	O
an	O
extension	O
of	O
Logoot	O
in	O
order	O
to	O
reduce	O
the	O
metadata	O
for	O
sequence	O
CRDTs	B-Operating_System
.	O
</s>
<s>
MUTE	O
is	O
an	O
online	O
web-based	O
peer-to-peer	O
real-time	B-Application
collaborative	I-Application
editor	I-Application
relying	O
on	O
the	O
LogootSplit	O
algorithm	O
.	O
</s>
<s>
Industrial	O
sequence	O
CRDTs	B-Operating_System
,	O
including	O
open-source	O
ones	O
,	O
are	O
known	O
to	O
out-perform	O
academic	O
implementations	O
due	O
to	O
optimizations	O
and	O
a	O
more	O
realistic	O
testing	O
methodology	O
.	O
</s>
<s>
The	O
main	O
popular	O
example	O
is	O
Yjs	O
CRDT	B-Operating_System
,	O
a	O
pioneer	O
in	O
using	O
a	O
plain	O
list	O
instead	O
of	O
a	O
tree	O
(	O
ala	O
Kleppmann	O
's	O
automerge	O
)	O
.	O
</s>
<s>
Fluid	B-Application
Framework	I-Application
is	O
an	O
open-source	O
collaborative	O
platform	O
built	O
by	O
Microsoft	O
that	O
provides	O
both	O
server	O
reference	O
implementations	O
and	O
client-side	O
SDKs	O
for	O
creating	O
modern	O
realtime	O
web	O
applications	O
using	O
CRDTs	B-Operating_System
.	O
</s>
<s>
Nimbus	B-Operating_System
Note	I-Operating_System
is	O
a	O
collaborative	O
note-taking	O
application	O
that	O
uses	O
the	O
Yjs	O
CRDT	B-Operating_System
for	O
collaborative	O
editing	O
.	O
</s>
<s>
Redis	B-Operating_System
is	O
a	O
distributed	O
,	O
highly	O
available	O
and	O
scalable	O
in-memory	O
database	O
that	O
uses	O
CRDTs	B-Operating_System
for	O
implementing	O
globally	O
distributed	B-Application
databases	I-Application
based	O
on	O
and	O
fully	O
compatible	O
with	O
Redis	B-Operating_System
open	O
source	O
.	O
</s>
<s>
SoundCloud	O
open-sourced	O
,	O
a	O
LWW-element-set	O
CRDT	B-Operating_System
for	O
the	O
SoundCloud	O
stream	O
implemented	O
on	O
top	O
of	O
Redis	B-Operating_System
.	O
</s>
<s>
Riak	B-General_Concept
is	O
a	O
distributed	O
NoSQL	B-General_Concept
key-value	O
data	O
store	O
based	O
on	O
CRDTs	B-Operating_System
.	O
</s>
<s>
League	B-Application
of	I-Application
Legends	I-Application
uses	O
the	O
Riak	B-General_Concept
CRDT	B-Operating_System
implementation	O
for	O
its	O
in-game	O
chat	B-Protocol
system	O
,	O
which	O
handles	O
7.5	O
million	O
concurrent	O
users	O
and	O
11,000	O
messages	O
per	O
second	O
.	O
</s>
<s>
Bet365	O
,	O
stores	O
hundreds	O
of	O
megabytes	O
of	O
data	O
in	O
the	O
Riak	B-General_Concept
implementation	O
of	O
OR-Set	O
.	O
</s>
<s>
TomTom	O
employs	O
CRDTs	B-Operating_System
to	O
synchronize	O
navigation	O
data	O
between	O
the	O
devices	O
of	O
a	O
user	O
.	O
</s>
<s>
Phoenix	B-Application
,	O
a	O
web	O
framework	O
written	O
in	O
Elixir	B-Language
,	O
uses	O
CRDTs	B-Operating_System
to	O
support	O
real	O
time	O
multi-node	O
information	O
sharing	O
in	O
version	O
1.2	O
.	O
</s>
<s>
Facebook	B-Application
implements	O
CRDTs	B-Operating_System
in	O
their	O
Apollo	O
low-latency	O
"	O
consistency	B-General_Concept
at	O
scale	O
"	O
database	O
.	O
</s>
<s>
Facebook	B-Application
uses	O
CRDTs	B-Operating_System
in	O
their	O
FlightTracker	O
system	O
for	O
managing	O
the	B-Application
Facebook	I-Application
graph	O
internally	O
.	O
</s>
<s>
Teletype	O
for	O
Atom	B-Application
employs	O
CRDTs	B-Operating_System
to	O
enable	O
developers	O
share	O
their	O
workspace	O
with	O
team	O
members	O
and	O
collaborate	O
on	O
code	O
in	O
real	O
time	O
.	O
</s>
<s>
Haja	O
Networks	O
 '	O
OrbitDB	O
uses	O
operation-based	O
CRDTs	B-Operating_System
in	O
its	O
core	O
data	B-General_Concept
structure	I-General_Concept
,	O
IPFS-Log	O
.	O
</s>
<s>
Apple	O
implements	O
CRDTs	B-Operating_System
in	O
the	O
Notes	O
app	O
for	O
syncing	O
offline	O
edits	O
between	O
multiple	O
devices	O
.	O
</s>
<s>
is	O
a	O
platform	O
for	O
running	O
distributed	O
real-time	O
streaming	B-Operating_System
applications	O
that	O
deliver	O
continuous	O
intelligence	O
.	O
</s>
<s>
It	O
uses	O
streaming	B-Operating_System
actors	O
that	O
stream	O
pure	O
op-based	O
CRDT	B-Operating_System
state	O
updates	O
to	O
other	O
actors	O
in	O
a	O
DAG	O
that	O
implements	O
a	O
streaming	B-Operating_System
data	I-Operating_System
pipeline	O
.	O
</s>
<s>
is	O
a	O
client	O
side	O
NoSQL	B-General_Concept
database	O
for	O
distributed	O
real-time	O
streaming	B-Operating_System
applications	O
.	O
</s>
<s>
It	O
has	O
a	O
that	O
enables	O
to	O
update	O
document	O
by	O
storing	O
NoSQL	B-General_Concept
based	O
CRDT	B-Operating_System
deltas	O
and	O
replicate	O
these	O
with	O
other	O
clients	O
or	O
a	O
backend	O
server	O
.	O
</s>
