Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Cassandra NoSQL  fmasanori@gmail.com    17 de março de 2012 slideshare.net/fmasanori
•   Eu, vocês e Java•   Motivação•   Big Data e NoSQL•   Cassandra•   Hello World: Cassandra•   Pentaho•   Hello World: Pe...
• Computação IME-USP e Mestrado ITA• ed e lint Cobra Tecnologia• Credicard Mastercard – sistema autorização• PriceWaterhou...
Vocês•   Estudantes•   Professores•   Desenvolvedores Java•   Sabe quem é Sang Shin•   Sun Tech Days/ Java One•   NoSQL•  ...
Job Trends (indeed.com)
Job Trends (indeed.com)
Big Data
Big Data•   2720 exabytes serão criados em 2012•   1 exabyte = 1 bilhão de gigabytes•   Mais bytes que estrelas no univers...
Novas arquiteturas são necessárias
Escalabilidade vertical• Escalabilidade para leituras num banco  relacional é trabalhoso• Escalabilidade para escritas num...
Escalabilidade vertical
Escalabilidade horizontal
Escalabilidade horizontal
Dois artigos famosos• Bigtable: A distributed storage system for  structured data, 2006• Dynamo: Amazon’s highly available...
Apache Hadoop
Not Only SQLMas BDs não relacionais são antigos...
Qual o problema com bancos de         dados relacionais?“If I had asked people what they wanted, they                would...
Escalabilidade + ACID = digestão difícil
BASE = ajuda na digestãoBasically Available Soft State Eventually Consistent
Eventually Consistent  “Eventual” pt-br: pode não ocorrer“Eventual” inglês: irá ocorrer em breve
Teorema CAP• Consistency:  – Todos os clientes enxergam os mesmos dados  – Consistência tradicional (ACID)  – Consistência...
Not Only SQL
Difíceis de comparar
Cassandra: • Distribuído • Tolerante à falhas • Escalável • Orientado a colunas
Bigtable, 2006     Dynamo, 2007Open Source, 2008   Apache, 2009          Cassandra, 2010
Cassandra vs MySQL (50GB)MySQL: ~300ms write ~350ms readCassandra: ~0.12ms write ~15ms read
Hello World
Hello World CassandraDownload DataStax Community EditionouDownload Apache Cassandra./cassandra./cassandra-cli –h localhost...
Hello World Cassandracreate keyspace jugvale;use jugvale;create column family demo;set demo[0][0] = utf8(‘fernando’);set d...
Hello World Cassandra• Clientes Cassandra: Java, PHP, Python, Ruby...• CQL (Cassandra Query Language)• Pentaho Data Integr...
• Analytics no mercado mundial, Gartner:• 2009: +3.8 %• 2010: +13.4%• América Latina:• 2010: +19.5%
Operacional x Analítico                             Operacional                  AnalíticoPropósito               Executar...
Banco Relacional Tradicional                               (Timo Elliott, SAP)
Banco Colunar                (Timo Elliott, SAP)
Hello World: Pentaho + Cassandra
Hello World: Pentaho + Cassandra•   Gravar dados no Cassandra•   Ler dados do Cassandra•   Criar um relatório a partir do ...
Créditos• Jonathan Ellis (DataStax), vários slides• Timo Elliott (SAP), tetris colunar• ADAMSON, C., Star Schema, The Comp...
Outros tópicos• NewSQL• The End of an Architectural Era, M.  Stonebraker et al., VLDB 2007• Polyglot Persistence (Martin F...
Perguntas ou sugestões?   fmasanori@gmail.com  facebook.com/fmasanori   twitter.com/fmasanori
NoSQL com Cassandra
NoSQL com Cassandra
NoSQL com Cassandra
NoSQL com Cassandra
NoSQL com Cassandra
NoSQL com Cassandra
NoSQL com Cassandra
Upcoming SlideShare
Loading in …5
×

NoSQL com Cassandra

4,508 views

Published on

Apresentação do professor Fernando Masanori para o 1º Encontro do JUG Vale sobre o banco de dados NoSQL Cassandra.

  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

NoSQL com Cassandra

  1. 1. Cassandra NoSQL fmasanori@gmail.com 17 de março de 2012 slideshare.net/fmasanori
  2. 2. • Eu, vocês e Java• Motivação• Big Data e NoSQL• Cassandra• Hello World: Cassandra• Pentaho• Hello World: Pentaho + Cassandra• Perguntas e sugestões
  3. 3. • Computação IME-USP e Mestrado ITA• ed e lint Cobra Tecnologia• Credicard Mastercard – sistema autorização• PriceWaterhouseCoopers• Itaú BankBoston• Docente FATEC: algoritmos, estrutura de dados, data warehouse, tópicos avançados em bancos de dados• Interesses: Python, Data Warehouse, NoSQL, Pentaho, Google Technology, Facebook
  4. 4. Vocês• Estudantes• Professores• Desenvolvedores Java• Sabe quem é Sang Shin• Sun Tech Days/ Java One• NoSQL• Cassandra• Pentaho
  5. 5. Job Trends (indeed.com)
  6. 6. Job Trends (indeed.com)
  7. 7. Big Data
  8. 8. Big Data• 2720 exabytes serão criados em 2012• 1 exabyte = 1 bilhão de gigabytes• Mais bytes que estrelas no universo• Twitter: 230M tweets/dia• YouTube: upload de 1 hora de vídeo/seg• Drowning in numbers (The Economist)
  9. 9. Novas arquiteturas são necessárias
  10. 10. Escalabilidade vertical• Escalabilidade para leituras num banco relacional é trabalhoso• Escalabilidade para escritas num banco relacional é virtualmente impossível (e caso você consiga ele deixou de ser relacional...)
  11. 11. Escalabilidade vertical
  12. 12. Escalabilidade horizontal
  13. 13. Escalabilidade horizontal
  14. 14. Dois artigos famosos• Bigtable: A distributed storage system for structured data, 2006• Dynamo: Amazon’s highly available key- value store, 2007
  15. 15. Apache Hadoop
  16. 16. Not Only SQLMas BDs não relacionais são antigos...
  17. 17. Qual o problema com bancos de dados relacionais?“If I had asked people what they wanted, they would have said faster horses”. Henry Ford.
  18. 18. Escalabilidade + ACID = digestão difícil
  19. 19. BASE = ajuda na digestãoBasically Available Soft State Eventually Consistent
  20. 20. Eventually Consistent “Eventual” pt-br: pode não ocorrer“Eventual” inglês: irá ocorrer em breve
  21. 21. Teorema CAP• Consistency: – Todos os clientes enxergam os mesmos dados – Consistência tradicional (ACID) – Consistência eventual (BASE)• Availability• Partition tolerance• Não mais que 2 dos 3 requisitos (E. Brewer, S. Gilbert, N. Lynch)
  22. 22. Not Only SQL
  23. 23. Difíceis de comparar
  24. 24. Cassandra: • Distribuído • Tolerante à falhas • Escalável • Orientado a colunas
  25. 25. Bigtable, 2006 Dynamo, 2007Open Source, 2008 Apache, 2009 Cassandra, 2010
  26. 26. Cassandra vs MySQL (50GB)MySQL: ~300ms write ~350ms readCassandra: ~0.12ms write ~15ms read
  27. 27. Hello World
  28. 28. Hello World CassandraDownload DataStax Community EditionouDownload Apache Cassandra./cassandra./cassandra-cli –h localhost –p 9160Conflitos: cassandra.bat (windows) /etc/cassandra/cassandra-env.sh (ubuntu)Obs.: necessário Oracle Sun Java
  29. 29. Hello World Cassandracreate keyspace jugvale;use jugvale;create column family demo;set demo[0][0] = utf8(‘fernando’);set demo[0][1] = utf8(‘masanori’);get demo[0];del demo[0];exit;
  30. 30. Hello World Cassandra• Clientes Cassandra: Java, PHP, Python, Ruby...• CQL (Cassandra Query Language)• Pentaho Data Integration
  31. 31. • Analytics no mercado mundial, Gartner:• 2009: +3.8 %• 2010: +13.4%• América Latina:• 2010: +19.5%
  32. 32. Operacional x Analítico Operacional AnalíticoPropósito Executar um processo Avaliar um processoEstilo interação Insert, update, delete, query Query (read-only)Escopo interação Transação individual AgregaçãoPadrão query Previsível e estável ImprevisívelFoco temporal Atual Histórico e atualOtimização Update concorrente Query (agregação)Projeto ER na 3FN Star Schema ou Cubo (Adamson, 2010)
  33. 33. Banco Relacional Tradicional (Timo Elliott, SAP)
  34. 34. Banco Colunar (Timo Elliott, SAP)
  35. 35. Hello World: Pentaho + Cassandra
  36. 36. Hello World: Pentaho + Cassandra• Gravar dados no Cassandra• Ler dados do Cassandra• Criar um relatório a partir do Cassandra• Vídeos curtos incluídos nos links acima
  37. 37. Créditos• Jonathan Ellis (DataStax), vários slides• Timo Elliott (SAP), tetris colunar• ADAMSON, C., Star Schema, The Complete Reference, McGrawHill, 2010.
  38. 38. Outros tópicos• NewSQL• The End of an Architectural Era, M. Stonebraker et al., VLDB 2007• Polyglot Persistence (Martin Fowler)
  39. 39. Perguntas ou sugestões? fmasanori@gmail.com facebook.com/fmasanori twitter.com/fmasanori

×