Die Seite wird umgeblättert.
Das nächste Kapitel kommt in Sicht…
Psst… lies auf deine Weise.
Schriften und Designs findest du unter Darstellung. Deine Augen entscheiden mit.
Das nächste Kapitel kommt in Sicht…
A replicated data structure designed so concurrent changes can converge under specified merge or delivery rules, without coordinating every update.
Vorlesefunktion dieses Browsers wird geprüft…
Diese Lektüre ist derzeit auf Englisch verfügbar. Die Oberfläche verwendet deine gewählte Sprache.
Das englische Original lesen →The CRDT concept was formally defined in 2011 by Marc Shapiro, Nuno Preguiça, Carlos Baquero and Marek Zawirski. Development was initially motivated by collaborative text editing and mobile computing. CRDTs have also been used in online chat systems, online gambling, and in the SoundCloud audio distribution platform. The NoSQL distributed databases Redis, Riak and Cosmos DB have CRDT data types.
Concurrent updates to multiple replicas of the same data, without coordination between the computers hosting the replicas, can result in inconsistencies between the replicas, which in the general case may not be resolvable. Restoring consistency and data integrity when there are conflicts between updates may require some or all of the updates to be entirely or partially dropped.
Accordingly, much of distributed computing focuses on the problem of how to prevent concurrent updates to replicated data. But another possible approach is optimistic replication, where all concurrent updates are allowed to go through, with inconsistencies possibly created, and the results are merged or "resolved" later. In this approach, consistency between the replicas is eventually re-established via "merges" of differing replicas.
While optimistic replication might not work in the general case, there is a significant and practically useful class of data structures, CRDTs, where it does work — where it is always possible to merge or resolve concurrent updates on different replicas of the data structure without conflicts. This makes CRDTs ideal for optimistic replication.
As an example, a one-way boolean event flag is a trivial CRDT: one bit, with a value of true or false. True means some particular event has occurred at least once. False means the event has not occurred. Once set to true, the flag cannot be set back to false (an event having occurred cannot un-occur). The resolution method is "true wins": when merging a replica where the flag is true (that replica has observed the event), and another one where the flag is false (that replica hasn't observed the event), the resolved result is true — the event has been observed.
There are two approaches to CRDTs, both of which can provide strong eventual consistency: state-based CRDTs and operation-based CRDTs.
Ausgewählt und neu formatiert aus Conflict-free replicated data type, von den Mitwirkenden, unter CC BY-SA 4.0. Revision 1375433297. Abschnitte und Formatierung wurden gekürzt; die verlinkte Revision bietet den vollständigen Kontext und die Beitragshistorie. Der Referenztext behält seine Lizenz. Zusätzliche Quellenlinks stammen aus dieser Revision und wurden hier nicht unabhängig geprüft.