SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
CASSANDRA 
WEB-SCALE NOSQL DATA PLATFORM 
Marko Švaljek / @msvaljek 
0
ABOUT ME 
Software Developer at Kapsch 
Zagreb Cassandra Meetup
NUMBERS 
25% of the Fortune 100 use it 
Apple - 75 000 nodes, 10 PB of data 
Netflix - 2500 nodes, 1 trillion req/day 
DataStax - professional Cassandra support 
Meetup - 167 Groups, 114 Cities, 41 Countries
FUN PART 
Android TV Box 
Arduino
FUN PART 
Android TV Box 
Arduino
BREWER'S CAP THEOREM 
Availability 
nodes can fail 
CA AP 
RDBMS Cassandra 
Consistency Partition Tolerance 
CP 
same data for all network fails 
MongoDB
CONSISTENT HASHING - 1 
hash_function: row_key -> [0 .. 99] 
A 
D 
0 
C B 
25 
50 
75
CONSISTENT HASHING - 2 
Murmur3: row_key -> -263 to 263-1 
A 
B C 
D 
hash(C") 
hash(A") 
hash(D") 
hash(B")
CONSISTENT HASHING - 3 
num_tokens: 256 
virtual nodes
GOSSIP 
A 
H B 
C 
D 
F 
E is down 
G is down 
1 
2 
3
CLIENT REQUESTS 
A 
Client D B 
C 
Coordinator 
Node 
quorum = 
replication_factor 
2 
+ 1
WRITE PATH 
Memory 
Disk 
Commit log 
memtable 
Data 
memtable 
SSTable 
Flush 
Index
COMPACTION 
Latest data entries 
Remove 
tombstones 
- - - - - - - - - - 
- - - - - - - - - - 
- - - - - - - - - - 
Merge 
Uncompacted data 
- - - - - 
- - - - - 
- - - - - 
- - - - - 
- - - - - 
Compacted data 
- - - - - 
Consolidate
BLOOM FILTER 
A B C 
1 1 1 0 1 1 0 0 0 1 0 1 
✓ ✓ ✗ 
D
READING FROM SSTABLE 
Data? 
Memory 
Disk 
Read Bloom Filter 
Data not in filter Data is in filter 
Key Cache 
SSTable Data
DATA ORGANIZATION 
Keyspace 
Column family (table) 
Column Column 
Row Value Value 
... 
Timpestamp Timpestamp
KEYSPACE 
CREATE KEYSPACE used_cars 
WITH replication = { 
'class': 'SimpleStrategy', 
'replication_factor' : 1}; 
CREATE KEYSPACE used_cars 
WITH replication = { 
'class': 'NetworkTopologyStrategy', 
'DC1' : 1, 
'DC2' : 3};
TABLES 
CREATE TABLE users ( 
username text PRIMARY KEY, 
password text, 
first_name text, 
last_name text, 
state text 
);
INSERTING 
INSERT INTO 
offers (username, date, price, 
brand, model, year, mileage, color) 
VALUES ('jsmith', '2014-09-19 11:35:20', 6000, 
'BMW', '120i', 2010, 40000, 'Black');
UPDATE 
UPDATE offers SET 
brand = 'Ford', 
model = 'Mustang' 
WHERE 
username = 'jdoe' 
AND date = '2014-08-11 17:12:32+0200'; 
Use upsert (insert same data) when possible 
NO updating of primary key fields
DELETE 
DELETE FROM offers 
WHERE username = 'jdoe' 
AND date = '2014-08-11 17:12:32+0200'; 
tombstones
SELECT 
SELECT username, date, brand, model 
FROM offers 
WHERE username = 'jsmith'; 
username | date | brand | model 
----------+--------------------------+-------+------- 
jsmith | 2014-05-11 01:22:11+0200 | Ford | Orion 
jsmith | 2014-09-09 11:35:20+0200 | BMW | 118d 
jsmith | 2014-09-19 11:35:20+0200 | BMW | 120i 
jsmith | 2014-09-20 17:12:32+0200 | Audi | A6
APPS 
15+ languages supported 
var cql = require('node-cassandra-cql'); 
var client = new cql.Client({ 
hosts: ['127.0.0.1:9042'], 
keyspace: 'test' 
}); 
client.execute('SELECT * FROM test_table', [], 
function(err, result) { 
for (var i = 0; i < result.rows.length; i++) { 
console.log(result.rows[i].get('id')); 
console.log(result.rows[i].get('test_value')); 
} 
} 
);
THANK YOU! 
Q & A 
@msvaljek

Weitere ähnliche Inhalte

Andere mochten auch

Cloud storage in azienda: perche` Riak ci e` piaciuto
Cloud storage in azienda: perche` Riak ci e` piaciutoCloud storage in azienda: perche` Riak ci e` piaciuto
Cloud storage in azienda: perche` Riak ci e` piaciutoBioDec
 
Cassandra - Wellington No Sql
Cassandra - Wellington No SqlCassandra - Wellington No Sql
Cassandra - Wellington No Sqlaaronmorton
 
NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandrarantav
 
NoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
NoSQL Data Stores: Introduzione alle Basi di Dati Non RelazionaliNoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
NoSQL Data Stores: Introduzione alle Basi di Dati Non RelazionaliSteve Maraspin
 
Cassandra + Hadoop: Analisi Batch con Apache Cassandra
Cassandra + Hadoop: Analisi Batch con Apache CassandraCassandra + Hadoop: Analisi Batch con Apache Cassandra
Cassandra + Hadoop: Analisi Batch con Apache CassandraJeremy Hanna
 
Eletti big data_trento_25ott14
Eletti big data_trento_25ott14Eletti big data_trento_25ott14
Eletti big data_trento_25ott14Valerio Eletti
 
AWS (Amazon Web Services) - Trevisan Davide
AWS (Amazon Web Services) - Trevisan DavideAWS (Amazon Web Services) - Trevisan Davide
AWS (Amazon Web Services) - Trevisan DavideDavide Trevisan
 
C* Keys: Partitioning, Clustering, & CrossFit (Adam Hutson, DataScale) | Cass...
C* Keys: Partitioning, Clustering, & CrossFit (Adam Hutson, DataScale) | Cass...C* Keys: Partitioning, Clustering, & CrossFit (Adam Hutson, DataScale) | Cass...
C* Keys: Partitioning, Clustering, & CrossFit (Adam Hutson, DataScale) | Cass...DataStax
 
Big Data Bullshit Bingo
Big Data Bullshit BingoBig Data Bullshit Bingo
Big Data Bullshit BingoDanny Linden
 
Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...
Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...
Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...DataStax Academy
 
Cassandra Data Model
Cassandra Data ModelCassandra Data Model
Cassandra Data Modelebenhewitt
 
NoSQL, No Worries: Vecchi Problemi, Nuove Soluzioni
NoSQL, No Worries: Vecchi Problemi, Nuove SoluzioniNoSQL, No Worries: Vecchi Problemi, Nuove Soluzioni
NoSQL, No Worries: Vecchi Problemi, Nuove SoluzioniSteve Maraspin
 
Continuous Processing with Apache Flink - Strata London 2016
Continuous Processing with Apache Flink - Strata London 2016Continuous Processing with Apache Flink - Strata London 2016
Continuous Processing with Apache Flink - Strata London 2016Stephan Ewen
 
Apache Flink Crash Course by Slim Baltagi and Srini Palthepu
Apache Flink Crash Course by Slim Baltagi and Srini PalthepuApache Flink Crash Course by Slim Baltagi and Srini Palthepu
Apache Flink Crash Course by Slim Baltagi and Srini PalthepuSlim Baltagi
 

Andere mochten auch (20)

Cloud storage in azienda: perche` Riak ci e` piaciuto
Cloud storage in azienda: perche` Riak ci e` piaciutoCloud storage in azienda: perche` Riak ci e` piaciuto
Cloud storage in azienda: perche` Riak ci e` piaciuto
 
Cassandra - Wellington No Sql
Cassandra - Wellington No SqlCassandra - Wellington No Sql
Cassandra - Wellington No Sql
 
Seminar presentation final
Seminar presentation finalSeminar presentation final
Seminar presentation final
 
NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandra
 
NoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
NoSQL Data Stores: Introduzione alle Basi di Dati Non RelazionaliNoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
NoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
 
No SQL Cassandra
No SQL CassandraNo SQL Cassandra
No SQL Cassandra
 
Cassandra + Hadoop: Analisi Batch con Apache Cassandra
Cassandra + Hadoop: Analisi Batch con Apache CassandraCassandra + Hadoop: Analisi Batch con Apache Cassandra
Cassandra + Hadoop: Analisi Batch con Apache Cassandra
 
NoSql - Key Value
NoSql - Key ValueNoSql - Key Value
NoSql - Key Value
 
Eletti big data_trento_25ott14
Eletti big data_trento_25ott14Eletti big data_trento_25ott14
Eletti big data_trento_25ott14
 
AWS (Amazon Web Services) - Trevisan Davide
AWS (Amazon Web Services) - Trevisan DavideAWS (Amazon Web Services) - Trevisan Davide
AWS (Amazon Web Services) - Trevisan Davide
 
Apache Flink Hands On
Apache Flink Hands OnApache Flink Hands On
Apache Flink Hands On
 
Cassandra ppt 1
Cassandra ppt 1Cassandra ppt 1
Cassandra ppt 1
 
C* Keys: Partitioning, Clustering, & CrossFit (Adam Hutson, DataScale) | Cass...
C* Keys: Partitioning, Clustering, & CrossFit (Adam Hutson, DataScale) | Cass...C* Keys: Partitioning, Clustering, & CrossFit (Adam Hutson, DataScale) | Cass...
C* Keys: Partitioning, Clustering, & CrossFit (Adam Hutson, DataScale) | Cass...
 
Big Data Bullshit Bingo
Big Data Bullshit BingoBig Data Bullshit Bingo
Big Data Bullshit Bingo
 
Introduzione a Riak
Introduzione a RiakIntroduzione a Riak
Introduzione a Riak
 
Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...
Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...
Cassandra Community Webinar: Apache Spark Analytics at The Weather Channel - ...
 
Cassandra Data Model
Cassandra Data ModelCassandra Data Model
Cassandra Data Model
 
NoSQL, No Worries: Vecchi Problemi, Nuove Soluzioni
NoSQL, No Worries: Vecchi Problemi, Nuove SoluzioniNoSQL, No Worries: Vecchi Problemi, Nuove Soluzioni
NoSQL, No Worries: Vecchi Problemi, Nuove Soluzioni
 
Continuous Processing with Apache Flink - Strata London 2016
Continuous Processing with Apache Flink - Strata London 2016Continuous Processing with Apache Flink - Strata London 2016
Continuous Processing with Apache Flink - Strata London 2016
 
Apache Flink Crash Course by Slim Baltagi and Srini Palthepu
Apache Flink Crash Course by Slim Baltagi and Srini PalthepuApache Flink Crash Course by Slim Baltagi and Srini Palthepu
Apache Flink Crash Course by Slim Baltagi and Srini Palthepu
 

Ähnlich wie Cassandra, web scale no sql data platform

Updates from Cassandra Summit 2016 & SASI Indexes
Updates from Cassandra Summit 2016 & SASI IndexesUpdates from Cassandra Summit 2016 & SASI Indexes
Updates from Cassandra Summit 2016 & SASI IndexesJim Hatcher
 
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10Altinity Ltd
 
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project ADN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project ADataconomy Media
 
Oracle to Cassandra Core Concepts Guide Pt. 2
Oracle to Cassandra Core Concepts Guide Pt. 2Oracle to Cassandra Core Concepts Guide Pt. 2
Oracle to Cassandra Core Concepts Guide Pt. 2DataStax Academy
 
Meetup cassandra for_java_cql
Meetup cassandra for_java_cqlMeetup cassandra for_java_cql
Meetup cassandra for_java_cqlzznate
 
Quick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to knowQuick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to knowRafał Hryniewski
 
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗YUCHENG HU
 
Cassandra lesson learned - extended
Cassandra   lesson learned  - extendedCassandra   lesson learned  - extended
Cassandra lesson learned - extendedAndrzej Ludwikowski
 
DataStax: Old Dogs, New Tricks. Teaching your Relational DBA to fetch
DataStax: Old Dogs, New Tricks. Teaching your Relational DBA to fetchDataStax: Old Dogs, New Tricks. Teaching your Relational DBA to fetch
DataStax: Old Dogs, New Tricks. Teaching your Relational DBA to fetchDataStax Academy
 
Postgres Conference (PgCon) New York 2019
Postgres Conference (PgCon) New York 2019Postgres Conference (PgCon) New York 2019
Postgres Conference (PgCon) New York 2019Ibrar Ahmed
 
Spark with Cassandra by Christopher Batey
Spark with Cassandra by Christopher BateySpark with Cassandra by Christopher Batey
Spark with Cassandra by Christopher BateySpark Summit
 
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOTricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOAltinity Ltd
 
Cassandra Data Modeling
Cassandra Data ModelingCassandra Data Modeling
Cassandra Data ModelingBen Knear
 
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftBest Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftAmazon Web Services
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon RedshiftAmazon Web Services
 
Getting started with amazon redshift - Toronto
Getting started with amazon redshift - TorontoGetting started with amazon redshift - Toronto
Getting started with amazon redshift - TorontoAmazon Web Services
 

Ähnlich wie Cassandra, web scale no sql data platform (20)

Updates from Cassandra Summit 2016 & SASI Indexes
Updates from Cassandra Summit 2016 & SASI IndexesUpdates from Cassandra Summit 2016 & SASI Indexes
Updates from Cassandra Summit 2016 & SASI Indexes
 
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
 
Presentation
PresentationPresentation
Presentation
 
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project ADN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
 
Cassandra - lesson learned
Cassandra  - lesson learnedCassandra  - lesson learned
Cassandra - lesson learned
 
Oracle to Cassandra Core Concepts Guide Pt. 2
Oracle to Cassandra Core Concepts Guide Pt. 2Oracle to Cassandra Core Concepts Guide Pt. 2
Oracle to Cassandra Core Concepts Guide Pt. 2
 
Meetup cassandra for_java_cql
Meetup cassandra for_java_cqlMeetup cassandra for_java_cql
Meetup cassandra for_java_cql
 
Quick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to knowQuick trip around the Cosmos - Things every astronaut supposed to know
Quick trip around the Cosmos - Things every astronaut supposed to know
 
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
 
Cassandra lesson learned - extended
Cassandra   lesson learned  - extendedCassandra   lesson learned  - extended
Cassandra lesson learned - extended
 
DataStax: Old Dogs, New Tricks. Teaching your Relational DBA to fetch
DataStax: Old Dogs, New Tricks. Teaching your Relational DBA to fetchDataStax: Old Dogs, New Tricks. Teaching your Relational DBA to fetch
DataStax: Old Dogs, New Tricks. Teaching your Relational DBA to fetch
 
Postgres Conference (PgCon) New York 2019
Postgres Conference (PgCon) New York 2019Postgres Conference (PgCon) New York 2019
Postgres Conference (PgCon) New York 2019
 
MySQL lecture
MySQL lectureMySQL lecture
MySQL lecture
 
Spark with Cassandra by Christopher Batey
Spark with Cassandra by Christopher BateySpark with Cassandra by Christopher Batey
Spark with Cassandra by Christopher Batey
 
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOTricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
 
Cassandra Data Modeling
Cassandra Data ModelingCassandra Data Modeling
Cassandra Data Modeling
 
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftBest Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
MySQL SQL Tutorial
MySQL SQL TutorialMySQL SQL Tutorial
MySQL SQL Tutorial
 
Getting started with amazon redshift - Toronto
Getting started with amazon redshift - TorontoGetting started with amazon redshift - Toronto
Getting started with amazon redshift - Toronto
 

Kürzlich hochgeladen

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
🐬 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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 

Kürzlich hochgeladen (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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...
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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...
 

Cassandra, web scale no sql data platform

  • 1. CASSANDRA WEB-SCALE NOSQL DATA PLATFORM Marko Švaljek / @msvaljek 0
  • 2. ABOUT ME Software Developer at Kapsch Zagreb Cassandra Meetup
  • 3. NUMBERS 25% of the Fortune 100 use it Apple - 75 000 nodes, 10 PB of data Netflix - 2500 nodes, 1 trillion req/day DataStax - professional Cassandra support Meetup - 167 Groups, 114 Cities, 41 Countries
  • 4. FUN PART Android TV Box Arduino
  • 5. FUN PART Android TV Box Arduino
  • 6. BREWER'S CAP THEOREM Availability nodes can fail CA AP RDBMS Cassandra Consistency Partition Tolerance CP same data for all network fails MongoDB
  • 7. CONSISTENT HASHING - 1 hash_function: row_key -> [0 .. 99] A D 0 C B 25 50 75
  • 8. CONSISTENT HASHING - 2 Murmur3: row_key -> -263 to 263-1 A B C D hash(C") hash(A") hash(D") hash(B")
  • 9. CONSISTENT HASHING - 3 num_tokens: 256 virtual nodes
  • 10. GOSSIP A H B C D F E is down G is down 1 2 3
  • 11. CLIENT REQUESTS A Client D B C Coordinator Node quorum = replication_factor 2 + 1
  • 12. WRITE PATH Memory Disk Commit log memtable Data memtable SSTable Flush Index
  • 13. COMPACTION Latest data entries Remove tombstones - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Merge Uncompacted data - - - - - - - - - - - - - - - - - - - - - - - - - Compacted data - - - - - Consolidate
  • 14. BLOOM FILTER A B C 1 1 1 0 1 1 0 0 0 1 0 1 ✓ ✓ ✗ D
  • 15. READING FROM SSTABLE Data? Memory Disk Read Bloom Filter Data not in filter Data is in filter Key Cache SSTable Data
  • 16. DATA ORGANIZATION Keyspace Column family (table) Column Column Row Value Value ... Timpestamp Timpestamp
  • 17. KEYSPACE CREATE KEYSPACE used_cars WITH replication = { 'class': 'SimpleStrategy', 'replication_factor' : 1}; CREATE KEYSPACE used_cars WITH replication = { 'class': 'NetworkTopologyStrategy', 'DC1' : 1, 'DC2' : 3};
  • 18. TABLES CREATE TABLE users ( username text PRIMARY KEY, password text, first_name text, last_name text, state text );
  • 19. INSERTING INSERT INTO offers (username, date, price, brand, model, year, mileage, color) VALUES ('jsmith', '2014-09-19 11:35:20', 6000, 'BMW', '120i', 2010, 40000, 'Black');
  • 20. UPDATE UPDATE offers SET brand = 'Ford', model = 'Mustang' WHERE username = 'jdoe' AND date = '2014-08-11 17:12:32+0200'; Use upsert (insert same data) when possible NO updating of primary key fields
  • 21. DELETE DELETE FROM offers WHERE username = 'jdoe' AND date = '2014-08-11 17:12:32+0200'; tombstones
  • 22. SELECT SELECT username, date, brand, model FROM offers WHERE username = 'jsmith'; username | date | brand | model ----------+--------------------------+-------+------- jsmith | 2014-05-11 01:22:11+0200 | Ford | Orion jsmith | 2014-09-09 11:35:20+0200 | BMW | 118d jsmith | 2014-09-19 11:35:20+0200 | BMW | 120i jsmith | 2014-09-20 17:12:32+0200 | Audi | A6
  • 23. APPS 15+ languages supported var cql = require('node-cassandra-cql'); var client = new cql.Client({ hosts: ['127.0.0.1:9042'], keyspace: 'test' }); client.execute('SELECT * FROM test_table', [], function(err, result) { for (var i = 0; i < result.rows.length; i++) { console.log(result.rows[i].get('id')); console.log(result.rows[i].get('test_value')); } } );
  • 24. THANK YOU! Q & A @msvaljek