SlideShare ist ein Scribd-Unternehmen logo
1 von 50
NoSQL: No sweat with JBoss Data Grid

    Shane Johnson
    Technical Marketing Manager

    Tristan Tarrant
    Principal Software Engineer

    10/08/2012


1                 Shane K Johnson / Tristan Tarrant
NoSQL NOSQL




2     Shane K Johnson / Tristan Tarrant
Agenda

    ●   Data Stores
    ●   Data Grid
         ●   NOSQL
         ●   Cache
    ●   Big Data
    ●   Use Cases
    ●   Q&A




3                     Shane K Johnson / Tristan Tarrant
Data Stores

    ●   Key / Value
    ●   Document
    ●   Graph
    ●   Column Family
    ●   And more...




4                       Shane K Johnson / Tristan Tarrant
Data Grid?




5   Shane K Johnson / Tristan Tarrant
6   Shane K Johnson / Tristan Tarrant
7   Shane K Johnson / Tristan Tarrant
8   Shane K Johnson / Tristan Tarrant
NOSQL

    ●   Elasticity
    ●   Distributed Data
    ●   Concurrency
    ●   CAP Theorem
    ●   Flexibility




9                          Shane K Johnson / Tristan Tarrant
Elasticity

     ●   Node Discovery
     ●   Failure Detection




10                           Shane K Johnson / Tristan Tarrant
How?




11   Shane K Johnson / Tristan Tarrant
JBoss Data Grid is built on a reliable group
          membership protocol: JGroups.




12                  Shane K Johnson / Tristan Tarrant
Distributed Data




13    Shane K Johnson / Tristan Tarrant
Replicated




14           Shane K Johnson / Tristan Tarrant
Distributed




15            Shane K Johnson / Tristan Tarrant
How?




16   Shane K Johnson / Tristan Tarrant
Consistent Hashing
     JBoss Data Grid Implementation: MurmurHash3




17                 Shane K Johnson / Tristan Tarrant
Hash Wheel




18           Shane K Johnson / Tristan Tarrant
Virtual Nodes




19              Shane K Johnson / Tristan Tarrant
Linear Scaling




20               Shane K Johnson / Tristan Tarrant
Concurrency




21   Shane K Johnson / Tristan Tarrant
How?




22   Shane K Johnson / Tristan Tarrant
Multi Version Concurrency Control




23               Shane K Johnson / Tristan Tarrant
Internals

     ●   Transactions
          ●   2 PC
          ●   Isolation Level
               ●   Read Committed
               ●   Repeatable Read
          ●   Locking
               ●   Optimistic
               ●   Pessimistic
          ●   Write Skew
               ●   Version – Vector Clocks



24                                 Shane K Johnson / Tristan Tarrant
Consistency




25   Shane K Johnson / Tristan Tarrant
CAP Theorem
         Eric Brewer




26   Shane K Johnson / Tristan Tarrant
CAP Theorem

     ●   Consistency
     ●   Availability
     ●   Partition Tolerance




27                             Shane K Johnson / Tristan Tarrant
JBoss Data Grid + CAP Theorem

     ●   No Physical Partition
          ●   Consistent and Available (C + A)
     ●   Physical Partition
          ●   Available (A + P)
     ●   Pseudo Partition (e.g. Unresponsive Node)
          ●   Consistent or Available (C + P / A + P)




28                                Shane K Johnson / Tristan Tarrant
Flexibility




29   Shane K Johnson / Tristan Tarrant
Flexibility

     ●   Replicated Data
          ●   Replication Queue
          ●   State Transfer – Enable / Disabled
     ●   Distributed Data
          ●   Number of Owners
          ●   Rehash – Enable / Disable
     ●   Communication – Synchronous / Asynchronous
     ●   Isolation – Read Committed / Repeatable Read
     ●   Locking – Optimistic / Pessimistic


30                             Shane K Johnson / Tristan Tarrant
31   Shane K Johnson / Tristan Tarrant
Caching and Data Grids for JEE




       Caching                                            Data Grids

                 JSR-107                                               JSR-347




32                    Shane K Johnson / Tristan Tarrant
Caching in Java

     ●   Developers have been doing it forever
          ●   To increase performance
          ●   To offload legacy data-stores from unnecessary
              requests
     ●   Home-brew approach based on Hashtables and Maps
     ●   Many Free and commercial libraries but...
     ●   … no Standard !




33                            Shane K Johnson / Tristan Tarrant
JSR-107: Caching for JEE

     ●   Local (single JVM) and Distributed (multiple JVMs)
         caches
     ●   CacheManager: a way to obtain caches
     ●   Cache, “inspired” by the Map API with extensions for
         entry expiration and additional atomic operations
     ●   A Cache Lifecycle (starting, stopping)
     ●   Entry Listeners for specific events
     ●   Optional features: JTA support and annotations
     ●   One of the oldest JSRs, dormant for a long time,
         recently revived by JSR-347

34                          Shane K Johnson / Tristan Tarrant
And now ?

     ●   Now that I've put a lot of data in my distributed cache,
         what can I do with it ?
     ●   And most importantly...
     ●   HOW ?




35                           Shane K Johnson / Tristan Tarrant
Multiple clustering options

     ●   Replication
     ●   All nodes have all of the data.
     ●   Grid Size == smallest node
     ●   Distribution
     ●   The Grid maintains n copies of each time of data on
         different nodes
     ●   Grid Size == total size / n




36                           Shane K Johnson / Tristan Tarrant
We like asynchronous

     ●   So much that we want it in the API:
     ●   Future<V> getAsync(K);
     ●   Future<V> getAndPut(K, V);




37                          Shane K Johnson / Tristan Tarrant
Keeping things close together

     ●   If I need to access semantically-close data quickly, why
         not keep it on the same node ?
     ●   Grouping API
     ●   Distribution per-group and not per-key
     ●   Via annotations
     ●   Via a Grouper class




38                          Shane K Johnson / Tristan Tarrant
Eventual consistency

     ●   One step further than asynchronous clustering for
         higher performance
     ●   Entries are tagged with a version (e.g. a timestamp or
         a time-based UUID): newer versions will eventually
         replace all older versions in the cluster
     ●   Applications retrieving data may get an older entry,
         which may be “good enough”




39                          Shane K Johnson / Tristan Tarrant
Big Data




40   Shane K Johnson / Tristan Tarrant
Remote Query




41             Shane K Johnson / Tristan Tarrant
Distributed Query




42                  Shane K Johnson / Tristan Tarrant
Performing parallel computation

     ●   Distributed Executors
     ●   Run on all nodes where a cache exists
     ●   Each executor works on the slice of data local to itself
     ●   Fastest access
     ●   Parallelization of operations
     ●   Usually returns




43                          Shane K Johnson / Tristan Tarrant
Map / Reduce

     ●   A mapper function iterates through a set of key/values
         transforming them and sending them to a collector

         void map(KIn, VIn, Collector<KOut, Vout>)
     ●   A reducer works through the collected values for each
         key, returning a single value

         VOut reduce(KOut, Iterator<VOut>)
     ●   Finally a collator processes the reduced key/values
         and returns a result to the invoker

         R collate(Map<KOut, VOut> reducedResults)

44                          Shane K Johnson / Tristan Tarrant
Use Cases




45   Shane K Johnson / Tristan Tarrant
Replicated Use Case

     ●   Finance
         ●   Master / Slave
         ●   High Availability
         ●   Failover
         ●   Performance + Consistency
         ●   Data – Lifespan
         ●   Servers – Few
         ●   Memory – Medium




46                               Shane K Johnson / Tristan Tarrant
Distributed Use Case #1

     ●   Telecom / Media
          ●   Performance > Consistency
          ●   Data
               ●   Infinite
               ●   Calculated
          ●   Servers – Few
          ●   Memory – Large




47                              Shane K Johnson / Tristan Tarrant
Distributed Use Case #2

     ●   Telecom
         ●   Consistency > Performance
         ●   Data
              ●   Continuous
              ●   Limited Lifespan
         ●   Servers – Many
         ●   Memory - Normal




48                                   Shane K Johnson / Tristan Tarrant
Q&A

     Look for a follow up on the howtojboss.com blog.




49                    Shane K Johnson / Tristan Tarrant
Thanks for joining us.




50       Shane K Johnson / Tristan Tarrant

Weitere ähnliche Inhalte

Kürzlich hochgeladen

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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Kürzlich hochgeladen (20)

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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Empfohlen

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
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Empfohlen (20)

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...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

NoSQL, No sweat with JBoss Data Grid

  • 1. NoSQL: No sweat with JBoss Data Grid Shane Johnson Technical Marketing Manager Tristan Tarrant Principal Software Engineer 10/08/2012 1 Shane K Johnson / Tristan Tarrant
  • 2. NoSQL NOSQL 2 Shane K Johnson / Tristan Tarrant
  • 3. Agenda ● Data Stores ● Data Grid ● NOSQL ● Cache ● Big Data ● Use Cases ● Q&A 3 Shane K Johnson / Tristan Tarrant
  • 4. Data Stores ● Key / Value ● Document ● Graph ● Column Family ● And more... 4 Shane K Johnson / Tristan Tarrant
  • 5. Data Grid? 5 Shane K Johnson / Tristan Tarrant
  • 6. 6 Shane K Johnson / Tristan Tarrant
  • 7. 7 Shane K Johnson / Tristan Tarrant
  • 8. 8 Shane K Johnson / Tristan Tarrant
  • 9. NOSQL ● Elasticity ● Distributed Data ● Concurrency ● CAP Theorem ● Flexibility 9 Shane K Johnson / Tristan Tarrant
  • 10. Elasticity ● Node Discovery ● Failure Detection 10 Shane K Johnson / Tristan Tarrant
  • 11. How? 11 Shane K Johnson / Tristan Tarrant
  • 12. JBoss Data Grid is built on a reliable group membership protocol: JGroups. 12 Shane K Johnson / Tristan Tarrant
  • 13. Distributed Data 13 Shane K Johnson / Tristan Tarrant
  • 14. Replicated 14 Shane K Johnson / Tristan Tarrant
  • 15. Distributed 15 Shane K Johnson / Tristan Tarrant
  • 16. How? 16 Shane K Johnson / Tristan Tarrant
  • 17. Consistent Hashing JBoss Data Grid Implementation: MurmurHash3 17 Shane K Johnson / Tristan Tarrant
  • 18. Hash Wheel 18 Shane K Johnson / Tristan Tarrant
  • 19. Virtual Nodes 19 Shane K Johnson / Tristan Tarrant
  • 20. Linear Scaling 20 Shane K Johnson / Tristan Tarrant
  • 21. Concurrency 21 Shane K Johnson / Tristan Tarrant
  • 22. How? 22 Shane K Johnson / Tristan Tarrant
  • 23. Multi Version Concurrency Control 23 Shane K Johnson / Tristan Tarrant
  • 24. Internals ● Transactions ● 2 PC ● Isolation Level ● Read Committed ● Repeatable Read ● Locking ● Optimistic ● Pessimistic ● Write Skew ● Version – Vector Clocks 24 Shane K Johnson / Tristan Tarrant
  • 25. Consistency 25 Shane K Johnson / Tristan Tarrant
  • 26. CAP Theorem Eric Brewer 26 Shane K Johnson / Tristan Tarrant
  • 27. CAP Theorem ● Consistency ● Availability ● Partition Tolerance 27 Shane K Johnson / Tristan Tarrant
  • 28. JBoss Data Grid + CAP Theorem ● No Physical Partition ● Consistent and Available (C + A) ● Physical Partition ● Available (A + P) ● Pseudo Partition (e.g. Unresponsive Node) ● Consistent or Available (C + P / A + P) 28 Shane K Johnson / Tristan Tarrant
  • 29. Flexibility 29 Shane K Johnson / Tristan Tarrant
  • 30. Flexibility ● Replicated Data ● Replication Queue ● State Transfer – Enable / Disabled ● Distributed Data ● Number of Owners ● Rehash – Enable / Disable ● Communication – Synchronous / Asynchronous ● Isolation – Read Committed / Repeatable Read ● Locking – Optimistic / Pessimistic 30 Shane K Johnson / Tristan Tarrant
  • 31. 31 Shane K Johnson / Tristan Tarrant
  • 32. Caching and Data Grids for JEE Caching Data Grids JSR-107 JSR-347 32 Shane K Johnson / Tristan Tarrant
  • 33. Caching in Java ● Developers have been doing it forever ● To increase performance ● To offload legacy data-stores from unnecessary requests ● Home-brew approach based on Hashtables and Maps ● Many Free and commercial libraries but... ● … no Standard ! 33 Shane K Johnson / Tristan Tarrant
  • 34. JSR-107: Caching for JEE ● Local (single JVM) and Distributed (multiple JVMs) caches ● CacheManager: a way to obtain caches ● Cache, “inspired” by the Map API with extensions for entry expiration and additional atomic operations ● A Cache Lifecycle (starting, stopping) ● Entry Listeners for specific events ● Optional features: JTA support and annotations ● One of the oldest JSRs, dormant for a long time, recently revived by JSR-347 34 Shane K Johnson / Tristan Tarrant
  • 35. And now ? ● Now that I've put a lot of data in my distributed cache, what can I do with it ? ● And most importantly... ● HOW ? 35 Shane K Johnson / Tristan Tarrant
  • 36. Multiple clustering options ● Replication ● All nodes have all of the data. ● Grid Size == smallest node ● Distribution ● The Grid maintains n copies of each time of data on different nodes ● Grid Size == total size / n 36 Shane K Johnson / Tristan Tarrant
  • 37. We like asynchronous ● So much that we want it in the API: ● Future<V> getAsync(K); ● Future<V> getAndPut(K, V); 37 Shane K Johnson / Tristan Tarrant
  • 38. Keeping things close together ● If I need to access semantically-close data quickly, why not keep it on the same node ? ● Grouping API ● Distribution per-group and not per-key ● Via annotations ● Via a Grouper class 38 Shane K Johnson / Tristan Tarrant
  • 39. Eventual consistency ● One step further than asynchronous clustering for higher performance ● Entries are tagged with a version (e.g. a timestamp or a time-based UUID): newer versions will eventually replace all older versions in the cluster ● Applications retrieving data may get an older entry, which may be “good enough” 39 Shane K Johnson / Tristan Tarrant
  • 40. Big Data 40 Shane K Johnson / Tristan Tarrant
  • 41. Remote Query 41 Shane K Johnson / Tristan Tarrant
  • 42. Distributed Query 42 Shane K Johnson / Tristan Tarrant
  • 43. Performing parallel computation ● Distributed Executors ● Run on all nodes where a cache exists ● Each executor works on the slice of data local to itself ● Fastest access ● Parallelization of operations ● Usually returns 43 Shane K Johnson / Tristan Tarrant
  • 44. Map / Reduce ● A mapper function iterates through a set of key/values transforming them and sending them to a collector void map(KIn, VIn, Collector<KOut, Vout>) ● A reducer works through the collected values for each key, returning a single value VOut reduce(KOut, Iterator<VOut>) ● Finally a collator processes the reduced key/values and returns a result to the invoker R collate(Map<KOut, VOut> reducedResults) 44 Shane K Johnson / Tristan Tarrant
  • 45. Use Cases 45 Shane K Johnson / Tristan Tarrant
  • 46. Replicated Use Case ● Finance ● Master / Slave ● High Availability ● Failover ● Performance + Consistency ● Data – Lifespan ● Servers – Few ● Memory – Medium 46 Shane K Johnson / Tristan Tarrant
  • 47. Distributed Use Case #1 ● Telecom / Media ● Performance > Consistency ● Data ● Infinite ● Calculated ● Servers – Few ● Memory – Large 47 Shane K Johnson / Tristan Tarrant
  • 48. Distributed Use Case #2 ● Telecom ● Consistency > Performance ● Data ● Continuous ● Limited Lifespan ● Servers – Many ● Memory - Normal 48 Shane K Johnson / Tristan Tarrant
  • 49. Q&A Look for a follow up on the howtojboss.com blog. 49 Shane K Johnson / Tristan Tarrant
  • 50. Thanks for joining us. 50 Shane K Johnson / Tristan Tarrant