crdts: consistency without concurrency controlistoica/classes/... · crdts: consistency without...
TRANSCRIPT
![Page 1: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/1.jpg)
CRDTs: Consistency without concurrency control
INRIA Research Report #6956 June 2009
Presented by Johann Schleier-Smith Berkeley CS294-110
October 26, 2015
Mihai Letia, Nuno Preguiça, Marc Shapiro
![Page 2: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/2.jpg)
Outline• Sample application: collaborative and concurrent editing
• Review assumptions
• CAP theorem
• CRDT Treedoc solution
• Discussion questions
![Page 3: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/3.jpg)
![Page 4: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/4.jpg)
![Page 5: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/5.jpg)
• Replicated data
• Multiple nodes
• Concurrent use
Assumptions
![Page 6: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/6.jpg)
• Replicated data
• Multiple nodes
• Concurrent use
Assumptions
time
A B C
![Page 7: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/7.jpg)
• Replicated data
• Multiple nodes
• Concurrent use
Assumptions
time
A B C
![Page 8: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/8.jpg)
• Replicated data
• Multiple nodes
• Concurrent use
Assumptions
time
conc
urre
ntbe
fore
afte
r
A B C
source
![Page 9: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/9.jpg)
![Page 10: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/10.jpg)
Core
Nebula
![Page 11: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/11.jpg)
CAP Expectations
• Consistency - people see documents that make sense
• Availability - keep working so long as local node is serviceable
• Partition tolerance - network graph not always fully connected
![Page 12: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/12.jpg)
Consistency
Partition tolerance Availability
• Traditional RDBMS • Impala
• Cassandra (R+W > N) • Spanner / F1 • BigTable
• Cassandra (R+W ≤ N) • Dynamo • Riak
×
![Page 13: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/13.jpg)
Consistency
Partition tolerance Availability
?
![Page 14: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/14.jpg)
Treedoc CRDT
• Broadcast all operations in messages
• Unique naming of insertion points
• Concurrent operations commute
• Coordinate for garbage collection
![Page 15: CRDTs: Consistency without concurrency controlistoica/classes/... · CRDTs: Consistency without concurrency control INRIA Research Report #6956 June 2009 Presented by Johann Schleier-Smith](https://reader034.vdocuments.site/reader034/viewer/2022042811/5fa8f41ad5343526614978ae/html5/thumbnails/15.jpg)
Questions• Is messaging model realistic (guaranteed delivery, causal order)?
• Could we implement garbage collection without coordination?
• Do CRDTs really “beat CAP”?
• Do CRDTs describe the entire design space that “beats CAP”?
• Are CRDTs useful in real applications?