SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
Lightning Introduction
to Cassandra

Michaël Figuière
@mfiguiere
Speaker

                 Michaël Figuière




                      @mfiguiere


©2012 DataStax                      2
Ring Architecture


                        Node     Node




                 Node     Cassandra     Node




                        Node
                                Node




©2012 DataStax                                 3
Ring Architecture


                         Node     Replica




                 Node
                                            Replica




                        Node
                                Replica




©2012 DataStax                                        4
Linear Scalability
                 Client Writes/s by Node Count - Replication Factor = 3




©2012 DataStax                                                            5
Client / Server Communication

          Client   ?           Node     Replica



          Client

                       Node
                                                  Replica
          Client


                              Node
          Client                      Replica




©2012 DataStax                                              6
Client / Server Communication

          Client           Node         Replica



          Client

                   Node
                                                  Replica
          Client


                          Node
          Client                      Replica




                   Coordinator node:
                   Forwards all R/W requests
                   to corresponding replicas
©2012 DataStax                                              7
Request Path
                       1
          Client                   Node             Replica
                                              2

                                                   3
          Client
                   4                                    2
                           Node
                                                              Replica
                                                        3
          Client
                                                    2
                                          3
                                  Node
          Client                                  Replica




                           Coordinator node

©2012 DataStax                                                          8
Column Family Data Model


                             name        email         address    state
                  jbellis
                            Jonathan   jb@ds.com      123 main    TX
                             name        email         address    state
                  dhutch
                             Daria     dh@ds.com      45 2nd st   CA
                             name        email
                 egilmore
                              Eric     eg@ds.com


                 Row Key                         Columns




©2012 DataStax                                                            9
Column Family Data Model


                            dhutch     egilmore    datastax   mzcassie
                  jbellis

                            egilmore
                  dhutch

                            datastax   mzcassie
                 egilmore



                 Row Key                     Columns




©2012 DataStax                                                           10
CQL3 Data Model
    Timeline Table
         user_id     tweet_id      author                       body
         gmason        1765        phenry      Give me liberty or give me death
         gmason        1742      gwashington   I chopped down the cherry tree
       ahamilton       1797        jadams      A government of laws, not men
       ahamilton       1742      gwashington   I chopped down the cherry tree

       Partition     Remaining
         Key           Key




©2012 DataStax                                                                    11
CQL3 Data Model
    Timeline Table
         user_id     tweet_id     author                       body
         gmason        1765       phenry      Give me liberty or give me death
         gmason        1742     gwashington   I chopped down the cherry tree
       ahamilton       1797       jadams      A government of laws, not men
       ahamilton       1742     gwashington   I chopped down the cherry tree


    CQL
                   CREATE TABLE timeline (
                            user_id varchar,
                            tweet_id uuid,
                            author varchar,
                            body varchar,
                            PRIMARY KEY (user_id, tweet_id));


©2012 DataStax                                                                   12
CQL3 Data Model
    Timeline Table
         user_id         tweet_id        author                            body
         gmason            1765          phenry       Give me liberty or give me death
         gmason            1742        gwashington    I chopped down the cherry tree
       ahamilton           1797          jadams       A government of laws, not men
       ahamilton           1742        gwashington    I chopped down the cherry tree



Timeline Physical Layout
                 [1742, author]       [1742, body]        [1765, author]          [1765, body]
   gmason
                 gwashington      I chopped down the...      phenry        Give me liberty or give...
                 [1742, author]       [1742, body]        [1797, author]          [1797, body]
 ahamilton
                 gwashington      I chopped down the...      jadams        A government of laws...


©2012 DataStax                                                                                          13
Stay Tuned!

          blog.datastax.com
          @mfiguiere

Mais conteúdo relacionado

Destaque

Gemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSqlGemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSql
Duchess France
 

Destaque (6)

Hands-On Apache Spark
Hands-On Apache SparkHands-On Apache Spark
Hands-On Apache Spark
 
Conding Dojo Fruit Shop
Conding Dojo Fruit ShopConding Dojo Fruit Shop
Conding Dojo Fruit Shop
 
An Introduction to Cassandra - Oracle User Group
An Introduction to Cassandra - Oracle User GroupAn Introduction to Cassandra - Oracle User Group
An Introduction to Cassandra - Oracle User Group
 
Gemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSqlGemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSql
 
An Introduction To Cassandra
An Introduction To CassandraAn Introduction To Cassandra
An Introduction To Cassandra
 
An Introduction to Apache Cassandra
An Introduction to Apache CassandraAn Introduction to Apache Cassandra
An Introduction to Apache Cassandra
 

Mais de Duchess France (8)

Intro - La Marmite NoSql
Intro - La Marmite NoSqlIntro - La Marmite NoSql
Intro - La Marmite NoSql
 
2 ans de Duchess France - Ouverture
2 ans de Duchess France - Ouverture2 ans de Duchess France - Ouverture
2 ans de Duchess France - Ouverture
 
Ces nanas qui codent
Ces nanas qui codentCes nanas qui codent
Ces nanas qui codent
 
Design poo togo_jug_final
Design poo togo_jug_finalDesign poo togo_jug_final
Design poo togo_jug_final
 
Duchess advice events_september2011
Duchess advice events_september2011Duchess advice events_september2011
Duchess advice events_september2011
 
Trivial Java - Part 2
Trivial Java - Part 2Trivial Java - Part 2
Trivial Java - Part 2
 
Trivial Java - Part 1
Trivial Java - Part 1Trivial Java - Part 1
Trivial Java - Part 1
 
Presentation anniversaire duchess
Presentation anniversaire duchessPresentation anniversaire duchess
Presentation anniversaire duchess
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Data stax - lightning introduction to cassandra - Marmite NoSql

  • 2. Speaker Michaël Figuière @mfiguiere ©2012 DataStax 2
  • 3. Ring Architecture Node Node Node Cassandra Node Node Node ©2012 DataStax 3
  • 4. Ring Architecture Node Replica Node Replica Node Replica ©2012 DataStax 4
  • 5. Linear Scalability Client Writes/s by Node Count - Replication Factor = 3 ©2012 DataStax 5
  • 6. Client / Server Communication Client ? Node Replica Client Node Replica Client Node Client Replica ©2012 DataStax 6
  • 7. Client / Server Communication Client Node Replica Client Node Replica Client Node Client Replica Coordinator node: Forwards all R/W requests to corresponding replicas ©2012 DataStax 7
  • 8. Request Path 1 Client Node Replica 2 3 Client 4 2 Node Replica 3 Client 2 3 Node Client Replica Coordinator node ©2012 DataStax 8
  • 9. Column Family Data Model name email address state jbellis Jonathan jb@ds.com 123 main TX name email address state dhutch Daria dh@ds.com 45 2nd st CA name email egilmore Eric eg@ds.com Row Key Columns ©2012 DataStax 9
  • 10. Column Family Data Model dhutch egilmore datastax mzcassie jbellis egilmore dhutch datastax mzcassie egilmore Row Key Columns ©2012 DataStax 10
  • 11. CQL3 Data Model Timeline Table user_id tweet_id author body gmason 1765 phenry Give me liberty or give me death gmason 1742 gwashington I chopped down the cherry tree ahamilton 1797 jadams A government of laws, not men ahamilton 1742 gwashington I chopped down the cherry tree Partition Remaining Key Key ©2012 DataStax 11
  • 12. CQL3 Data Model Timeline Table user_id tweet_id author body gmason 1765 phenry Give me liberty or give me death gmason 1742 gwashington I chopped down the cherry tree ahamilton 1797 jadams A government of laws, not men ahamilton 1742 gwashington I chopped down the cherry tree CQL CREATE TABLE timeline ( user_id varchar, tweet_id uuid, author varchar, body varchar, PRIMARY KEY (user_id, tweet_id)); ©2012 DataStax 12
  • 13. CQL3 Data Model Timeline Table user_id tweet_id author body gmason 1765 phenry Give me liberty or give me death gmason 1742 gwashington I chopped down the cherry tree ahamilton 1797 jadams A government of laws, not men ahamilton 1742 gwashington I chopped down the cherry tree Timeline Physical Layout [1742, author] [1742, body] [1765, author] [1765, body] gmason gwashington I chopped down the... phenry Give me liberty or give... [1742, author] [1742, body] [1797, author] [1797, body] ahamilton gwashington I chopped down the... jadams A government of laws... ©2012 DataStax 13
  • 14. Stay Tuned! blog.datastax.com @mfiguiere