SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Dernier

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Dernier (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

En vedette

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
 

En vedette (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