SlideShare ist ein Scribd-Unternehmen logo
1 von 53
Downloaden Sie, um offline zu lesen
1 
Š 2014 by Intellectual Reserve, Inc. All rights reserved. 
Huge Online Genealogical Database 
Driven By Cassandra 
Cassandra Summit 2014 
John Sumsion
2 
Outline 
• Introduction to FamilySearch Family Tree 
• Outline of Cassandra reimplementation 
• Journal-based Consistency Model 
• Experience with Cassandra
3 
What is FamilySearch? 
Familysearch.org website 
Very large single pedigree (Family Tree) 
Largest collection of free genealogical records 
Largest genealogical library 
Family History Department of Church of Jesus 
Christ of Latter-day Saints (known as Mormons)
4 
Why does FamilySearch exist? 
Visit http://mormon.org/family-history/
5 
Family Tree 
Records Indexing 
Family 
Tree 
Memories 
Community 
Where it fits
6 
Record Preservation 
Neglect 
Time 
Disasters (e.g. WWII)
7 
Record Preservation (continued) 
• 100 million images published online / year
8 
Indexing 
3.5 billion indexed records – 35M / month 
Turns this… …into this!
9 
Memories
10 
Community
11 
Family Tree 
Records Indexing 
Family 
Tree 
Memories 
Community 
Where it fits
12 
Family Tree Data 
Family Tree: 
• 900M+ person records, open-edit 
• 500M+ relationships, open-edit 
• 8.4B change log entries, 100M+ per quarter 
• Dynamic OLTP system 
• Data-dependent performance issues
13 
Family Tree: Example 9 Gen Pedigree 
up to 511 person slots 
Dynamic content!
14 
Family Tree: Example Pedigree App 
31+ persons per section 
Dynamic content!
15 
Family Tree: Example Ancestor Page 
10+ persons in families 
100-1000+ changes 
Dynamic content!
16 
Family Tree: Example Change History 
100-1000+ changes 
Dynamic content!
17 
Contents 
• Introduction to FamilySearch Family Tree 
• Outline of Cassandra reimplementation 
• Journal-based Consistency Model 
• Experience with Cassandra
18 
Performance & Scale 
• Slow page views 
• pedigree (500-3000ms for 3 generations) 
• change history (2000+ms for first page of changes) 
• large family view 
• Query problems 
• relationships connect persons, range scan by person id 
• every person => person traversal is 200-300M btree scan 
(global index) 
• change history queries travers 8+B btree scan 
(global index)
19 
Performance & Scale 
• Query performance problems 
Person 
Relati 
onship 
Person 
Wide range scan 
Pedigree 
Change History 
Change 
History 
Wide range scan
20 
Cassandra Reimplementation 
• selected Cassandra after extensive testing 
• full data scale proof-of-concept & tests 
• required: new data model (performance) 
• required: new consistency model (critical!)
21 
Cassandra Reimplementation 
• event-sourced data model – journal / views 
• new data model – no indexes 
• new consistency model – satisfies consistency 
JE #8 
P1 P1 Views 
A B 
JE #6 
P2 P2 Views 
A B
22 
Cassandra Reimplementation 
• denormalized relationships 
P1 P2 
R1 
R2 
R3 
R5 
R4
23 
Cassandra Reimplementation 
• denormalized relationships 
P1 P2 
R1 
R2 
R3 
R5 
R4 
R2 
R3
24 
Cassandra Reimplementation 
• denormalized relationships 
• exact duplication allows biderectional traversal 
Person 
/Rels 
Person 
/Rels 
Person 
Relatio 
nship 
Person 
Wide query 
P1 P2 
R1 
R2 
R3 
R5 
R4 
R2 
R3
25 
Cassandra Reimplementation 
• change history is a core feature 
• denormalized change history 
• optimizes for displaying recent changes 
JE #8 
P1 P1 Change History View 
1000s of changes 
(spread over multiple Cassandra cells) 
Last 100-1000 changes 
(local to a single Cassandra cell)
26 
Contents 
• Introduction to FamilySearch Family Tree 
• Outline of Cassandra reimplementation 
• Journal-based Consistency Model 
• Experience with Cassandra
27 
Journal-based Consistency Model 
Command Journal View 
View 
View 
Rough Process Flow 
captures edits 
safely 
stores edits 
canonically 
view-optimized 
summations
28 
Journal-based Consistency Model 
Command 
• write-once with quorum 
• application to journal requires 3 tables: 
pending / completed / aborted 
• idempotent application to journal 
Command Journal View 
View 
View
29 
Journal-based Consistency Model 
Command Schema 
• key: command v1 uuid (as text) 
• value: blob (binary json) 
Command Journal View 
View 
View
30 
Journal-based Consistency Model 
Journal 
• write-once with quorum & C* batch 
• denormalized byte-exact across 
affected persons & relationships 
• each entry stored in separate cell 
(compaction required for fast journal reads) 
Command Journal View 
View 
View
31 
Journal-based Consistency Model 
Journal 
• CmRDT (commutative replicated type) 
• partitions converge without conflict 
because of unique uuid 
Command Journal View 
View 
View
32 
Journal-based Consistency Model 
Command Journal View 
View 
View 
Partition Key Command UUID Content (blob) 
KWZ3-P71 
KWZ3-P71 
eda6f967-0955… 
6af8d90c-8f3a… 
{ "attribution": {}, … } (binary json) 
{ "attribution": {}, … } (binary json) 
KCDT-J59 fd35ac61-7def… { "attribution": {}, … } (binary json) 
KCDT-J59 b2db2fa5-da5f… { "attribution": {}, … } (binary json)
33 
Journal-based Consistency Model 
View 
• multiple views for multiple uses 
(person, person card, change history) 
• populated by applying journal entries 
• incrementally updated in steady state 
• not canonical data, can be recalculated 
Command Journal View 
View 
View
34 
Journal-based Consistency Model 
Command Journal View 
View 
View 
P1 P1 Views 
A B
35 
Journal-based Consistency Model 
Command Journal View 
View 
View 
JE #8 
P1 P1 Views 
A B 
JE #8 JE #8
36 
Journal-based Consistency Model 
Command Journal View 
View 
View 
P1 P1 Views 
A B 
JE #8 JE #8 
A 
(new) 
B 
(new) 
JE #8
37 
Journal-based Consistency Model 
Command Journal View 
View 
View 
P1 P1 Views 
A B
38 
Journal-based Consistency Model 
View 
• views have same schema as journal 
• journal entries are written to view for 
incremental refresh 
• core of the consistency model 
Command Journal View 
View 
View
39 
Journal-based Consistency Model 
View 
• CvRDT (convergent replicated type) 
• partitions converge with conflict; resolved 
by full view refresh from canonical journal 
• steady state: one view of a given type per 
entity 
Command Journal View 
View 
View
40 
Journal-based Consistency Model 
Command Journal View 
View 
View 
P1 P1 Views 
A B 
JE #8 JE #8 
A 
(new) 
B 
(new) 
JE #8
41 
Journal-based Consistency Model 
• Performance & Scale 
• lookup by partition key only, no indexes 
• any cross-entity change happens in duplicate on all 
• stored “current-state” views – cheapest possible read 
• custom views – tunable to different use cases 
• disposable views – able to tweak view over time
42 
Journal-based Consistency Model 
• Business Rule Enforcement 
• Read / Write / Read & Revert 
• pre-command checks prevent invalid changes 
• write with appropriate quorum ensures consistent write 
• post-command checks prevent business-rules conflicts 
• administrative revert marks command as “not applicable” 
and thereby causes full refresh which ignores changes 
• appropriate quorum: depending on the change, either 
LOCAL_QUORUM or EACH_QUORUM
43 
Journal-based Consistency Model 
• Strong consistency 
• command store – atomic capture of a single user action 
• command handling – idempotent writes to journal, 
picked up later even if interrupted 
• no global lock needed for optimistic concurrency 
• Read after write 
• consistency ONE for normal reads 
• quorum when the client knows it’s refreshing after write
44 
Journal-based Consistency Model 
• Journal / View Concerns 
• native support for change history 
• no journal tombstones in steady state – write-once 
• blob schema implementable on any db engine that 
supports two-level keys (partition, composite) 
• consistency model implementable on any db engine that 
supports batches & quorum writes/reads 
• view tombstones on every write, biggest concern 
• leveled compaction? 
• WISH: size-tiered compaction with data locality hoisting
45 
Contents 
• Introduction to FamilySearch Family Tree 
• Outline of Cassandra reimplementation 
• Journal-based Consistency Model 
• Experience with Cassandra
46 
Experience with Cassandra 
• tested Community 1.2 and 2.0 
• fantastic performance 
• easy cloud setup 
• great developer response 
• easy to bulk load through CQL3 
• harder to get running inside AWS VPC
47 
Experience with Cassandra 
• Bulk import experience 
• 8.4B change log records => 5.8B journal entries (2.5TB lzo) 
• ‘hi1.4xlarge’ cluster (2x 1TB SSDs) 
• import through CQL was fast enough 
• 11h to import 5-node cluster (5h on 30-node cluster) 
• 140k writes / sec, fed from 128 writer threads 
• 20 records / unlogged batch write, 1-2k record size 
• minimal post-import compaction (size-tiered) 
• ended up with 3.5-4TB on C* disk after import 
• OpsCenter – great visibility for tuning 
• Community – harder to automate repairs, etc.
48 
Experience with Cassandra 
• Full-scale load test experience 
• got to 25x our peak hourly load on 25-28-node cluster 
• production peak load included significant write load 
• working-set size was about 2M persons in a month 
• enabled row cache, ran almost entirely without disk access 
• bottlenecked on interconnect socket w/ round robin client 
• got 50% boost from token-aware, round robin client 
• OpsCenter – great visibility for tuning 
• Large SSD cluster – able to handle repair 
during scale tests
49 
Experience with Cassandra 
current system 
cassandra 
impl (1x, 10x, 20x)
50 
Experience with Cassandra 
current system 
cassandra 
impl (1x, 10x, 20x) 
LOG SCALE!
51 
Current Status 
• still working on implementation & rollout 
• migration, reconciliation, integration… 
• consistency model code separate
52 
Contents 
• Introduction to FamilySearch Family Tree 
• Outline of Cassandra reimplementation 
• Journal-based Consistency Model 
• Experience with Cassandra 
Questions?
53 
Contact Info 
John Sumsion 
Sr. Software Engineer 
sumsionjg@familysearch.org 
@jdsumsion 
Thanks to the team at FamilySearch! 
esp. Randy & James for doing the model 
Thanks to the awesome presenters & organizers at 
#CassandraSummit!

Weitere ähnliche Inhalte

Was ist angesagt?

Ndb cluster 80_ycsb_disk
Ndb cluster 80_ycsb_diskNdb cluster 80_ycsb_disk
Ndb cluster 80_ycsb_diskmikaelronstrom
 
Beyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forksBeyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forksSameer Kumar
 
2016 jan-pugs-meetup-v9.5-features
2016 jan-pugs-meetup-v9.5-features2016 jan-pugs-meetup-v9.5-features
2016 jan-pugs-meetup-v9.5-featuresSameer Kumar
 
Initial review of Firebird 3
Initial review of Firebird 3Initial review of Firebird 3
Initial review of Firebird 3Mind The Firebird
 
Percona FT / TokuDB
Percona FT / TokuDBPercona FT / TokuDB
Percona FT / TokuDBVadim Tkachenko
 
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New FeaturesRemote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New FeaturesRemote DBA Experts
 
MySQL Query Optimization (Basics)
MySQL Query Optimization (Basics)MySQL Query Optimization (Basics)
MySQL Query Optimization (Basics)Karthik .P.R
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresqlbotsplash.com
 
Cassandra: An Alien Technology That's not so Alien
Cassandra: An Alien Technology That's not so AlienCassandra: An Alien Technology That's not so Alien
Cassandra: An Alien Technology That's not so AlienBrian Hess
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiMySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiRemote MySQL DBA
 
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Masao Fujii
 
Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Tim Lossen
 
Introduction to TokuDB v7.5 and Read Free Replication
Introduction to TokuDB v7.5 and Read Free ReplicationIntroduction to TokuDB v7.5 and Read Free Replication
Introduction to TokuDB v7.5 and Read Free ReplicationTim Callaghan
 
Understanding How CQL3 Maps to Cassandra's Internal Data Structure
Understanding How CQL3 Maps to Cassandra's Internal Data StructureUnderstanding How CQL3 Maps to Cassandra's Internal Data Structure
Understanding How CQL3 Maps to Cassandra's Internal Data StructureDataStax
 
SQL Server 2014 Memory Optimised Tables - Advanced
SQL Server 2014 Memory Optimised Tables - AdvancedSQL Server 2014 Memory Optimised Tables - Advanced
SQL Server 2014 Memory Optimised Tables - AdvancedTony Rogerson
 
On Cassandra Development: Past, Present and Future
On Cassandra Development: Past, Present and FutureOn Cassandra Development: Past, Present and Future
On Cassandra Development: Past, Present and Futurepcmanus
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityIvan Zoratti
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Matt Fuller
 

Was ist angesagt? (19)

Ndb cluster 80_ycsb_disk
Ndb cluster 80_ycsb_diskNdb cluster 80_ycsb_disk
Ndb cluster 80_ycsb_disk
 
Beyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forksBeyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forks
 
2016 jan-pugs-meetup-v9.5-features
2016 jan-pugs-meetup-v9.5-features2016 jan-pugs-meetup-v9.5-features
2016 jan-pugs-meetup-v9.5-features
 
Initial review of Firebird 3
Initial review of Firebird 3Initial review of Firebird 3
Initial review of Firebird 3
 
Percona FT / TokuDB
Percona FT / TokuDBPercona FT / TokuDB
Percona FT / TokuDB
 
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New FeaturesRemote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New Features
 
MySQL Query Optimization (Basics)
MySQL Query Optimization (Basics)MySQL Query Optimization (Basics)
MySQL Query Optimization (Basics)
 
Liquibase
LiquibaseLiquibase
Liquibase
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresql
 
Cassandra: An Alien Technology That's not so Alien
Cassandra: An Alien Technology That's not so AlienCassandra: An Alien Technology That's not so Alien
Cassandra: An Alien Technology That's not so Alien
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiMySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup Mumbai
 
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
 
Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?
 
Introduction to TokuDB v7.5 and Read Free Replication
Introduction to TokuDB v7.5 and Read Free ReplicationIntroduction to TokuDB v7.5 and Read Free Replication
Introduction to TokuDB v7.5 and Read Free Replication
 
Understanding How CQL3 Maps to Cassandra's Internal Data Structure
Understanding How CQL3 Maps to Cassandra's Internal Data StructureUnderstanding How CQL3 Maps to Cassandra's Internal Data Structure
Understanding How CQL3 Maps to Cassandra's Internal Data Structure
 
SQL Server 2014 Memory Optimised Tables - Advanced
SQL Server 2014 Memory Optimised Tables - AdvancedSQL Server 2014 Memory Optimised Tables - Advanced
SQL Server 2014 Memory Optimised Tables - Advanced
 
On Cassandra Development: Past, Present and Future
On Cassandra Development: Past, Present and FutureOn Cassandra Development: Past, Present and Future
On Cassandra Development: Past, Present and Future
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
 

Ähnlich wie Cassandra Summit 2014: Huge Online Genealogical Database Driven By Cassandra

Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftAmazon Web Services
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftAmazon Web Services
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache KuduAndriy Zabavskyy
 
Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Dharma Shukla
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Mydbops
 
Dissecting Scalable Database Architectures
Dissecting Scalable Database ArchitecturesDissecting Scalable Database Architectures
Dissecting Scalable Database Architectureshypertable
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]Speedment, Inc.
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]Malin Weiss
 
Introduction to SolrCloud
Introduction to SolrCloudIntroduction to SolrCloud
Introduction to SolrCloudVarun Thacker
 
SQL Server2012 Enhancements
SQL Server2012 EnhancementsSQL Server2012 Enhancements
SQL Server2012 EnhancementsAbhishek Sur
 
Up-leveling Brownfield Integration
Up-leveling Brownfield IntegrationUp-leveling Brownfield Integration
Up-leveling Brownfield IntegrationWSO2
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
Cassandra
CassandraCassandra
Cassandraexsuns
 
SQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPSQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPTony Rogerson
 
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAmazon Web Services
 
Outside The Box With Apache Cassnadra
Outside The Box With Apache CassnadraOutside The Box With Apache Cassnadra
Outside The Box With Apache CassnadraEric Evans
 
cassandra_presentation_final
cassandra_presentation_finalcassandra_presentation_final
cassandra_presentation_finalSergioBruno21
 
Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Anubhav Kale
 

Ähnlich wie Cassandra Summit 2014: Huge Online Genealogical Database Driven By Cassandra (20)

Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache Kudu
 
Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops
 
Dissecting Scalable Database Architectures
Dissecting Scalable Database ArchitecturesDissecting Scalable Database Architectures
Dissecting Scalable Database Architectures
 
Cassandra training
Cassandra trainingCassandra training
Cassandra training
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
Nosql data models
Nosql data modelsNosql data models
Nosql data models
 
Introduction to SolrCloud
Introduction to SolrCloudIntroduction to SolrCloud
Introduction to SolrCloud
 
SQL Server2012 Enhancements
SQL Server2012 EnhancementsSQL Server2012 Enhancements
SQL Server2012 Enhancements
 
Up-leveling Brownfield Integration
Up-leveling Brownfield IntegrationUp-leveling Brownfield Integration
Up-leveling Brownfield Integration
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
Cassandra
CassandraCassandra
Cassandra
 
SQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPSQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTP
 
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
 
Outside The Box With Apache Cassnadra
Outside The Box With Apache CassnadraOutside The Box With Apache Cassnadra
Outside The Box With Apache Cassnadra
 
cassandra_presentation_final
cassandra_presentation_finalcassandra_presentation_final
cassandra_presentation_final
 
Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark
 

Mehr von DataStax Academy

Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craftForrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craftDataStax Academy
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseDataStax Academy
 
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache CassandraIntroduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache CassandraDataStax Academy
 
Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsDataStax Academy
 
Cassandra 3.0 Data Modeling
Cassandra 3.0 Data ModelingCassandra 3.0 Data Modeling
Cassandra 3.0 Data ModelingDataStax Academy
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackDataStax Academy
 
Data Modeling for Apache Cassandra
Data Modeling for Apache CassandraData Modeling for Apache Cassandra
Data Modeling for Apache CassandraDataStax Academy
 
Coursera Cassandra Driver
Coursera Cassandra DriverCoursera Cassandra Driver
Coursera Cassandra DriverDataStax Academy
 
Production Ready Cassandra
Production Ready CassandraProduction Ready Cassandra
Production Ready CassandraDataStax Academy
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonDataStax Academy
 
Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1DataStax Academy
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2DataStax Academy
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First ClusterDataStax Academy
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with DseDataStax Academy
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraDataStax Academy
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core ConceptsDataStax Academy
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseDataStax Academy
 
Bad Habits Die Hard
Bad Habits Die Hard Bad Habits Die Hard
Bad Habits Die Hard DataStax Academy
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraDataStax Academy
 

Mehr von DataStax Academy (20)

Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craftForrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
 
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache CassandraIntroduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
 
Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
 
Cassandra 3.0 Data Modeling
Cassandra 3.0 Data ModelingCassandra 3.0 Data Modeling
Cassandra 3.0 Data Modeling
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
 
Data Modeling for Apache Cassandra
Data Modeling for Apache CassandraData Modeling for Apache Cassandra
Data Modeling for Apache Cassandra
 
Coursera Cassandra Driver
Coursera Cassandra DriverCoursera Cassandra Driver
Coursera Cassandra Driver
 
Production Ready Cassandra
Production Ready CassandraProduction Ready Cassandra
Production Ready Cassandra
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
 
Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core Concepts
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
 
Bad Habits Die Hard
Bad Habits Die Hard Bad Habits Die Hard
Bad Habits Die Hard
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
 
Advanced Cassandra
Advanced CassandraAdvanced Cassandra
Advanced Cassandra
 

KĂźrzlich hochgeladen

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂşjo
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

KĂźrzlich hochgeladen (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Cassandra Summit 2014: Huge Online Genealogical Database Driven By Cassandra

  • 1. 1 Š 2014 by Intellectual Reserve, Inc. All rights reserved. Huge Online Genealogical Database Driven By Cassandra Cassandra Summit 2014 John Sumsion
  • 2. 2 Outline • Introduction to FamilySearch Family Tree • Outline of Cassandra reimplementation • Journal-based Consistency Model • Experience with Cassandra
  • 3. 3 What is FamilySearch? Familysearch.org website Very large single pedigree (Family Tree) Largest collection of free genealogical records Largest genealogical library Family History Department of Church of Jesus Christ of Latter-day Saints (known as Mormons)
  • 4. 4 Why does FamilySearch exist? Visit http://mormon.org/family-history/
  • 5. 5 Family Tree Records Indexing Family Tree Memories Community Where it fits
  • 6. 6 Record Preservation Neglect Time Disasters (e.g. WWII)
  • 7. 7 Record Preservation (continued) • 100 million images published online / year
  • 8. 8 Indexing 3.5 billion indexed records – 35M / month Turns this… …into this!
  • 11. 11 Family Tree Records Indexing Family Tree Memories Community Where it fits
  • 12. 12 Family Tree Data Family Tree: • 900M+ person records, open-edit • 500M+ relationships, open-edit • 8.4B change log entries, 100M+ per quarter • Dynamic OLTP system • Data-dependent performance issues
  • 13. 13 Family Tree: Example 9 Gen Pedigree up to 511 person slots Dynamic content!
  • 14. 14 Family Tree: Example Pedigree App 31+ persons per section Dynamic content!
  • 15. 15 Family Tree: Example Ancestor Page 10+ persons in families 100-1000+ changes Dynamic content!
  • 16. 16 Family Tree: Example Change History 100-1000+ changes Dynamic content!
  • 17. 17 Contents • Introduction to FamilySearch Family Tree • Outline of Cassandra reimplementation • Journal-based Consistency Model • Experience with Cassandra
  • 18. 18 Performance & Scale • Slow page views • pedigree (500-3000ms for 3 generations) • change history (2000+ms for first page of changes) • large family view • Query problems • relationships connect persons, range scan by person id • every person => person traversal is 200-300M btree scan (global index) • change history queries travers 8+B btree scan (global index)
  • 19. 19 Performance & Scale • Query performance problems Person Relati onship Person Wide range scan Pedigree Change History Change History Wide range scan
  • 20. 20 Cassandra Reimplementation • selected Cassandra after extensive testing • full data scale proof-of-concept & tests • required: new data model (performance) • required: new consistency model (critical!)
  • 21. 21 Cassandra Reimplementation • event-sourced data model – journal / views • new data model – no indexes • new consistency model – satisfies consistency JE #8 P1 P1 Views A B JE #6 P2 P2 Views A B
  • 22. 22 Cassandra Reimplementation • denormalized relationships P1 P2 R1 R2 R3 R5 R4
  • 23. 23 Cassandra Reimplementation • denormalized relationships P1 P2 R1 R2 R3 R5 R4 R2 R3
  • 24. 24 Cassandra Reimplementation • denormalized relationships • exact duplication allows biderectional traversal Person /Rels Person /Rels Person Relatio nship Person Wide query P1 P2 R1 R2 R3 R5 R4 R2 R3
  • 25. 25 Cassandra Reimplementation • change history is a core feature • denormalized change history • optimizes for displaying recent changes JE #8 P1 P1 Change History View 1000s of changes (spread over multiple Cassandra cells) Last 100-1000 changes (local to a single Cassandra cell)
  • 26. 26 Contents • Introduction to FamilySearch Family Tree • Outline of Cassandra reimplementation • Journal-based Consistency Model • Experience with Cassandra
  • 27. 27 Journal-based Consistency Model Command Journal View View View Rough Process Flow captures edits safely stores edits canonically view-optimized summations
  • 28. 28 Journal-based Consistency Model Command • write-once with quorum • application to journal requires 3 tables: pending / completed / aborted • idempotent application to journal Command Journal View View View
  • 29. 29 Journal-based Consistency Model Command Schema • key: command v1 uuid (as text) • value: blob (binary json) Command Journal View View View
  • 30. 30 Journal-based Consistency Model Journal • write-once with quorum & C* batch • denormalized byte-exact across affected persons & relationships • each entry stored in separate cell (compaction required for fast journal reads) Command Journal View View View
  • 31. 31 Journal-based Consistency Model Journal • CmRDT (commutative replicated type) • partitions converge without conflict because of unique uuid Command Journal View View View
  • 32. 32 Journal-based Consistency Model Command Journal View View View Partition Key Command UUID Content (blob) KWZ3-P71 KWZ3-P71 eda6f967-0955… 6af8d90c-8f3a… { "attribution": {}, … } (binary json) { "attribution": {}, … } (binary json) KCDT-J59 fd35ac61-7def… { "attribution": {}, … } (binary json) KCDT-J59 b2db2fa5-da5f… { "attribution": {}, … } (binary json)
  • 33. 33 Journal-based Consistency Model View • multiple views for multiple uses (person, person card, change history) • populated by applying journal entries • incrementally updated in steady state • not canonical data, can be recalculated Command Journal View View View
  • 34. 34 Journal-based Consistency Model Command Journal View View View P1 P1 Views A B
  • 35. 35 Journal-based Consistency Model Command Journal View View View JE #8 P1 P1 Views A B JE #8 JE #8
  • 36. 36 Journal-based Consistency Model Command Journal View View View P1 P1 Views A B JE #8 JE #8 A (new) B (new) JE #8
  • 37. 37 Journal-based Consistency Model Command Journal View View View P1 P1 Views A B
  • 38. 38 Journal-based Consistency Model View • views have same schema as journal • journal entries are written to view for incremental refresh • core of the consistency model Command Journal View View View
  • 39. 39 Journal-based Consistency Model View • CvRDT (convergent replicated type) • partitions converge with conflict; resolved by full view refresh from canonical journal • steady state: one view of a given type per entity Command Journal View View View
  • 40. 40 Journal-based Consistency Model Command Journal View View View P1 P1 Views A B JE #8 JE #8 A (new) B (new) JE #8
  • 41. 41 Journal-based Consistency Model • Performance & Scale • lookup by partition key only, no indexes • any cross-entity change happens in duplicate on all • stored “current-state” views – cheapest possible read • custom views – tunable to different use cases • disposable views – able to tweak view over time
  • 42. 42 Journal-based Consistency Model • Business Rule Enforcement • Read / Write / Read & Revert • pre-command checks prevent invalid changes • write with appropriate quorum ensures consistent write • post-command checks prevent business-rules conflicts • administrative revert marks command as “not applicable” and thereby causes full refresh which ignores changes • appropriate quorum: depending on the change, either LOCAL_QUORUM or EACH_QUORUM
  • 43. 43 Journal-based Consistency Model • Strong consistency • command store – atomic capture of a single user action • command handling – idempotent writes to journal, picked up later even if interrupted • no global lock needed for optimistic concurrency • Read after write • consistency ONE for normal reads • quorum when the client knows it’s refreshing after write
  • 44. 44 Journal-based Consistency Model • Journal / View Concerns • native support for change history • no journal tombstones in steady state – write-once • blob schema implementable on any db engine that supports two-level keys (partition, composite) • consistency model implementable on any db engine that supports batches & quorum writes/reads • view tombstones on every write, biggest concern • leveled compaction? • WISH: size-tiered compaction with data locality hoisting
  • 45. 45 Contents • Introduction to FamilySearch Family Tree • Outline of Cassandra reimplementation • Journal-based Consistency Model • Experience with Cassandra
  • 46. 46 Experience with Cassandra • tested Community 1.2 and 2.0 • fantastic performance • easy cloud setup • great developer response • easy to bulk load through CQL3 • harder to get running inside AWS VPC
  • 47. 47 Experience with Cassandra • Bulk import experience • 8.4B change log records => 5.8B journal entries (2.5TB lzo) • ‘hi1.4xlarge’ cluster (2x 1TB SSDs) • import through CQL was fast enough • 11h to import 5-node cluster (5h on 30-node cluster) • 140k writes / sec, fed from 128 writer threads • 20 records / unlogged batch write, 1-2k record size • minimal post-import compaction (size-tiered) • ended up with 3.5-4TB on C* disk after import • OpsCenter – great visibility for tuning • Community – harder to automate repairs, etc.
  • 48. 48 Experience with Cassandra • Full-scale load test experience • got to 25x our peak hourly load on 25-28-node cluster • production peak load included significant write load • working-set size was about 2M persons in a month • enabled row cache, ran almost entirely without disk access • bottlenecked on interconnect socket w/ round robin client • got 50% boost from token-aware, round robin client • OpsCenter – great visibility for tuning • Large SSD cluster – able to handle repair during scale tests
  • 49. 49 Experience with Cassandra current system cassandra impl (1x, 10x, 20x)
  • 50. 50 Experience with Cassandra current system cassandra impl (1x, 10x, 20x) LOG SCALE!
  • 51. 51 Current Status • still working on implementation & rollout • migration, reconciliation, integration… • consistency model code separate
  • 52. 52 Contents • Introduction to FamilySearch Family Tree • Outline of Cassandra reimplementation • Journal-based Consistency Model • Experience with Cassandra Questions?
  • 53. 53 Contact Info John Sumsion Sr. Software Engineer sumsionjg@familysearch.org @jdsumsion Thanks to the team at FamilySearch! esp. Randy & James for doing the model Thanks to the awesome presenters & organizers at #CassandraSummit!