SlideShare uma empresa Scribd logo
1 de 46
Ben Coverston [email_address] @bcoverston ,[object Object]
Eu ,[object Object],[object Object],[object Object],[object Object]
Datastax e Cassandra ,[object Object],[object Object],[object Object],[object Object]
Quem está usando Ela? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cassandra, você é diferente
Como é diferente? ,[object Object],[object Object],[object Object],[object Object]
Escalabilidade ,[object Object],[object Object],[object Object]
O fracasso é inevitável
Então …
ou…
A falta é um caso especial ? ?
Nós de Cassandra
Nós  de Cassandra (cont.)
Falha  com Cassandra
Modelagem de dados com Apache Cassandra ,[object Object],[object Object],[object Object]
Feito Em Big Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dados Primitivas  Column Family chave nome : valor nome : valor nome :valor chave nome : valor nome : valor nome : valor chave nome : valor nome: valor chave nome : valor nome : valor nome : valor nome : valor
Twissandra ,[object Object],[object Object]
Usuários Column Family Usuários alice nome : Allison senha : * bob nome : Roberto senha : * eve nome : Evelyn senha : * chuck nome : Carlos senha : * site : datastax.com
Estado Column Family Tweets LMNO timestamp : 175695372 corpo : estou tão equivicado? user : carlos AXML timestamp : 125695372 corpo: recebeu a minha mensagem?  user : alice  DEXDL timestamp : 155695372 corpo: ouvi o que diz. user : eve BADFO timestamp : 135695372 corpo : manda-me a senha. user : mallory
Pesquisando Dados em Twissandra ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Quem Segue Alice?  Column Family Followers alice bob :  mallory :  trent :
Quem é seguido por Alice? Column Family Following alice bob :  carlos :  david :
UserLine do Alice  Column Family UserLine alice 125695372 : AXML 126695372 : XCVL  127695372 : XENY bob 125795372 : SDFG 126895372 : XCVN  eve 125694372 : FDHL arthur 125600000 : AXML 125800000 : XCVL  127900000 : XENY
TimeLine do Alice Column Family Timeline bob 125795372 : SDFG 126895372 : XCVN  eve 1279900000 : FDHL arthur 125600000 : AXML 125800000 : XCVL  127900000 : XENY alice 125795372 : SDFG 125800000 : XCVL  1279900000 : FDHL
Bob da um novo estado Column Family Tweets LUMP timestamp : 200000000 body : Oi Alice user : bob AXML timestamp : 125695372 body : recebeu a minha mensagem? user : alice  DEXDL timestamp : 155695372 body : ouvi o que diz. user : eve BADFO timestamp : 135695372 body : manda-me a senha! user : mallory
UserLine e TimeLine Column Family UserLine Column Family TimeLine bob 127695372 : XENY 126695372 : XCVL  200000000 : LUMP alice 125795372 : SDFG 125800000 : XCVL  1279900000 : FDHL 200000000 : LUMP 125695372 : AXML bob 125795372 : SDFG 126895372 : XCVN  200000000 : LUMP eve 1279900000 : FDHL 200000000 : LUMP
Usando o Timeline Column Family Tweets alice LMNO timestamp : 175695372 body : am I always the third wheel? user : chuck AXML timestamp : 125695372 body : bob did you get my message?  user : alice  DEXDL timestamp : 155695372 body : I heard what you said user : eve BADFO timestamp : 135695372 body : send me your password! user : mallory
Vista Geral ,[object Object],[object Object],[object Object]
What’s new in Apache Cassandra 1.0 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Compressão
Compressão ,[object Object],[object Object],[object Object],[object Object]
Gerência Memória
Gerência Memória e Espaço Disquete ,[object Object],[object Object],[object Object]
Compacção
Compacção Overview
Compacção  ‘ Tiered ’
Compacção  ‘ Leveled ’
Desempenho
Desempenho ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Desempenho (Cont.)
Outros  Coisas …
Hints ,[object Object],[object Object],[object Object],[object Object]
Também Hadoop ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mas Informacões www.datastax.com ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Perguntas? ,[object Object],[object Object]

Mais conteúdo relacionado

Destaque

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Destaque (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

nosqlbr cassandra

  • 1.
  • 2.
  • 3.
  • 4.
  • 6.
  • 7.
  • 8. O fracasso é inevitável
  • 10. ou…
  • 11. A falta é um caso especial ? ?
  • 13. Nós de Cassandra (cont.)
  • 14. Falha com Cassandra
  • 15.
  • 16.
  • 17. Dados Primitivas Column Family chave nome : valor nome : valor nome :valor chave nome : valor nome : valor nome : valor chave nome : valor nome: valor chave nome : valor nome : valor nome : valor nome : valor
  • 18.
  • 19. Usuários Column Family Usuários alice nome : Allison senha : * bob nome : Roberto senha : * eve nome : Evelyn senha : * chuck nome : Carlos senha : * site : datastax.com
  • 20. Estado Column Family Tweets LMNO timestamp : 175695372 corpo : estou tão equivicado? user : carlos AXML timestamp : 125695372 corpo: recebeu a minha mensagem? user : alice DEXDL timestamp : 155695372 corpo: ouvi o que diz. user : eve BADFO timestamp : 135695372 corpo : manda-me a senha. user : mallory
  • 21.
  • 22. Quem Segue Alice? Column Family Followers alice bob : mallory : trent :
  • 23. Quem é seguido por Alice? Column Family Following alice bob : carlos : david :
  • 24. UserLine do Alice Column Family UserLine alice 125695372 : AXML 126695372 : XCVL 127695372 : XENY bob 125795372 : SDFG 126895372 : XCVN eve 125694372 : FDHL arthur 125600000 : AXML 125800000 : XCVL 127900000 : XENY
  • 25. TimeLine do Alice Column Family Timeline bob 125795372 : SDFG 126895372 : XCVN eve 1279900000 : FDHL arthur 125600000 : AXML 125800000 : XCVL 127900000 : XENY alice 125795372 : SDFG 125800000 : XCVL 1279900000 : FDHL
  • 26. Bob da um novo estado Column Family Tweets LUMP timestamp : 200000000 body : Oi Alice user : bob AXML timestamp : 125695372 body : recebeu a minha mensagem? user : alice DEXDL timestamp : 155695372 body : ouvi o que diz. user : eve BADFO timestamp : 135695372 body : manda-me a senha! user : mallory
  • 27. UserLine e TimeLine Column Family UserLine Column Family TimeLine bob 127695372 : XENY 126695372 : XCVL 200000000 : LUMP alice 125795372 : SDFG 125800000 : XCVL 1279900000 : FDHL 200000000 : LUMP 125695372 : AXML bob 125795372 : SDFG 126895372 : XCVN 200000000 : LUMP eve 1279900000 : FDHL 200000000 : LUMP
  • 28. Usando o Timeline Column Family Tweets alice LMNO timestamp : 175695372 body : am I always the third wheel? user : chuck AXML timestamp : 125695372 body : bob did you get my message? user : alice DEXDL timestamp : 155695372 body : I heard what you said user : eve BADFO timestamp : 135695372 body : send me your password! user : mallory
  • 29.
  • 30.
  • 32.
  • 34.
  • 37. Compacção ‘ Tiered ’
  • 38. Compacção ‘ Leveled ’
  • 40.
  • 43.
  • 44.
  • 45.
  • 46.

Notas do Editor

  1. ----- Meeting Notes (10/21/11 14:57) ----- Para compensar nos creamos um outro nó e escrivamos a ele a informação de duplo. Talves podemos tambem ler a data deste nó.
  2. ----- Meeting Notes (10/21/11 14:57) ----- Quando precisamos ----- Meeting Notes (10/21/11 15:28) ----- Até que nos creamos mas um nó para sirvilr os clientes que querm ler mas dados.
  3. ----- Meeting Notes (10/21/11 15:28) ----- Até que alguma coisa mais falha. E se a falha e o mestre, temos uma problema. Nos temos que pesquisar. É o mestre realmente falhado? Talves e só occupado, o rede
  4. Apache Cassandra is a flexible solution for modeling all types of data and scenarios. It is a Big Table based data store. Cassandra ’ s adaptation of BigTable has given it a flexible data model that fits many use cases while maintaining the scalability that the Amazon Dynamo based architecture affords.
  5. Filhera de colunas In a column based database the smallest logical unit of data is called a ‘ column ’ (slide here will animate the creation of a column by combining a nome and a valor into a single element). Not to be confused with the traditional RDBMS style column, this element consists of both a nome, and a valor. Columns can be combined together to create rows (animation). These rows are assigned a key. A key combined with a set of columns constitutes a row. Column families consist of a set of rows (animation), and some metadata. Column families determine how columns are sorted in rows. Most non-trivial use cases of Apache Cassandra leverage this sorting mechanism to their advantage to create indexes and materialized views of data stored in the system.
  6. A widely used example application for Cassandra is Twissandra. Twissandra is an example implementation that demonstrates how you might build a social media application on Cassandra.
  7. To build this model in Cassandra we first need to build a column family to hold our user data. This column family looks much like a table that you would see in any relational database. We include the nome of the user, email, and a few other bits of information all keyed by the usernome. Note that most of the columns are the same between the rows, but they can be different (animate adding the rows). In this column family we really don ’ t leverage the sorting of the columns in any meaningful way.
  8. We also need a column family to hold the data from the user ’ s activity on the website. These status updates are rows that consist of a randomly generated key, a timestamp, a body, and a user alias (animate the creation of this column family). (2:25)
  9. For the model to be useful we need to be able to query data from Cassandra. Queries in this system answer one of four questions. Who is following a user? Who does a user follow? What are the status updates for a user in the order they were entered? And finally, give me all of the status updates of a user and those people he follows in the order in which they were added to the system.
  10. To answer the question: Who is following a user we create a ‘ Followers ’ column family? We create a column family that consists of a key representing the user, and a set of columns that have the nomes of all of the followers of this user. (animation)
  11. The model for the ‘ Following ’ column family is exactly the same as the model for the ‘ Followers ’ . We have a key representing the user, and for ever other individual he follows we add a user id representing the people he is following.
  12. The ‘ UserLine ’ answers this question: in a given time frame what status updates have I made. To construct this column family we will again use the user ’ s nome as the key for this row. As this user updates his status we insert a new column into this row. The new column will consist of a timestamp (for the nome) and a unique identifier as a reference to the status update.
  13. Finally the ‘ Timeline ’ helps us to answer the question: give me the status updates for a user, and everyone he follows. This is modeled exactly like the userline, except the tweets inserted into this column family will consist not only of the user ’ s tweets, but also the tweets of everyone who is followed.
  14. In a live system when Bob logs into the Twissandra website and enters a new Status update. A new row is added to the Status column family.
  15. Subsequently the timestamp and identifier for that tweet are inserted into Bob ’ s row in the UserLine. After Bob ’ s userline is updated the tweet is propagated to his timeline and the time lines of each of his followers. In this example Alice, Eve, and Bob receive updates in their timelines.
  16. Over time Alice ’ s timeline may have hundreds of thousands of entries. To query her timeline efficiently Cassandra allows us to take a slice of entries rather than all of the items in the key. After retrieving the entries in the timeline we can request the status updates in timestamp order from the Statuses Column Family in bulk.
  17. The data model in Apache Cassandra is both simple and powerful. Hopefully this tutorial helps you to understand the role of Column Families in Apache Cassandra. How they can be used to both model data in your application, and supply query results beyond simply getting and setting valors in the database.
  18. X compression (Pavel) X leveldb (Ben) X memtable thresholds (Jonathan) X performance (Jonathan) - slice reads 25% (ArrayBackedSortedColumns) - 2498 - Network performance (1788) - arena allocation -> writes - misc (Jonathan) - windows service - hinted handoff improvements - multi-threaded compaction - node replacement - new CQL clients
  19. Pavel Yaskevitch
  20. 1. Novas regras para nos quando nos creamos novas filheras em memtables. Na passado todas as novas allocações forem o tamanho dos dados. E agora são de um tamanho fixo. Isto reduza a fragmentação no ‘ Heap ’ No Passandra Collecção do lixo ia reclamar velhos archivos de dados no disque. No 1.0 ela vai libertar os archivos immediatamente depois que são utilizados.
  21. Cassandra 1.0 optimizes slice reads by using a lighter-weight data structure for representing a row fragment from a read, than for a row fragment in a memtable into which we are accumulating updates. This results in about a 25% improvement in throughput. With named reads we can make a bigger improvement by only deserializing the most recent versions of the requested columns. This sounds obvious, and in fact Cassandra did this all the way back in 0.3. The trick is dealing with data that arrives in the “ wrong ” order because of network partitions, node failures, and so forth. Early Cassandra couldn ’ t do this, so we removed the optimization in 0.4, and finally added it back correctly for 1.0.
  22. Hinted handoff is intended to be more reliable, although it is still a best effort system. You could still loose your hints They are now stored as serialized mutations in the hints table rather than requiring a seek into the data directory to reply the hint itself. Node Replacement was previously a two part process. We have now added a switch that you can use on the startup of a node to replace a node directly. 0.8 introduced concurrent compaction, in 1.0 we introduced multi-threaded compaction where multiple rows can be compacted by a single thread.