SlideShare a Scribd company logo
NON-RELATIONAL
                               DATABASES




Saturday, October 31, 2009
@JPERRAS - JOEL PERRAS
                    Canadian Geek

                    Blog: http://nerderati.com

                    GitHub: http://github.com/jperras

                    CakePHP Core since Early 2009, PHP dev. since 2001

                    McGill University, Montréal, Canada - Physics,
                    Mathematics & Computer Science

                    Employer: Plank Design (http://plankdesign.com)
                    (Twitter: @plankdesign)

Saturday, October 31, 2009
RELATIONAL DATABASES

                    Many different vendors: MySQL, PostgreSQL,
                    SQLite, Oracle, ...

                    Same basic implementation:

                             B(+)-Trees for pages

                             B(+)-Trees or hash tables for secondary indexes

                             Possibly R-Trees for spatial indexes



Saturday, October 31, 2009
WHAT THEY’RE GOOD AT




Saturday, October 31, 2009
Schemas (relational models)

                    Familiar BCNF structure

                    Strong consistency

                    Transactions

                    Very “mature” & well tested (mostly)

                    Easy adoption/integration



Saturday, October 31, 2009
RDBMS’ES ARE NOT
                             GOING ANYWHERE


                    FriendFeed

                    Wikipedia

                    Google AdWords

                    Facebook




Saturday, October 31, 2009
Most small to medium size applications will
                   never need to go beyond a single database server.




Saturday, October 31, 2009
Always try and follow the Golden Web Application
                                  Development Rule:




Saturday, October 31, 2009
DON’T TRY TO SOLVE A
                     PROBLEM YOU DON’T
                           HAVE




Saturday, October 31, 2009
The web has created new problem domains in
                                data storage and querying.




Saturday, October 31, 2009
MODERN WEB APPS


                    Often use variable schemas

                             Optional fields: contact lists, addresses, favourite
                             movies/books, etc.

                             NULL-itis: null values should not be permitted in
                             BCNF, but are everywhere in web applications.




Saturday, October 31, 2009
MODERN WEB APPS


                    ‘Social’ apps => high write/read ratios

                    Complex Many-to-Many relationships

                             Joins become a problem in federated architectures

                    Eventual consistency is usually acceptable

                    Downtime unacceptable




Saturday, October 31, 2009
OTHER CONCERNS




Saturday, October 31, 2009
RULES OF APP AGING
                                     http://push.cx/2009/rules-of-database-app-aging




                             1. All fields become optional
                             2. All relationships become many-to-many
                             3. Chatter (comments explaining hacks)
                             grows with time.




Saturday, October 31, 2009
SOME GOOD PROBLEMS
                        TO HAVE
                             Even if they are “Hard” ones to solve.




Saturday, October 31, 2009
Load Balancing
                             (you can only live with one machine for so long)




Saturday, October 31, 2009
High Availability
                             (because disks fail, and replication fails)




Saturday, October 31, 2009
What’s a web application developer to do?




Saturday, October 31, 2009
Alternative Data Storage Solutions




Saturday, October 31, 2009
Not a silver bullet.

                            These can solve some problems,
                    but cause others and have their own limitations.

            It’s up to you to weigh the cost/benefit of your chosen
                                    solution.




Saturday, October 31, 2009
THE LANDSCAPE



                    Key/Value Stores/Distributed Hash Tables (DHT)

                    Document-oriented databases

                    Column-oriented databases




Saturday, October 31, 2009
KEY/VALUE STORES


                    Voldemort

                    Scalaris

                    Tokyo Cabinet

                    Redis

                    MemcacheDB




Saturday, October 31, 2009
DOCUMENT ORIENTED
                        DATA STORES


                    CouchDB <- (my favourite!)

                    MongoDB

                    SimpleDB (Amazon)




Saturday, October 31, 2009
COLUMN-ORIENTED
                                 STORES


                    BigTable (Google)

                    HBase (Hadoop Database)

                    Hypertable (BigTable Open Source clone)

                    Cassandra (Facebook)




Saturday, October 31, 2009
How do we use these technologies
                                  alongside CakePHP ?




Saturday, October 31, 2009
This year’s magical word:

                                   DataSources




Saturday, October 31, 2009
CASE STUDY - COUCHDB




                                 http://github.com/jperras/divan
                             (I will make zip/tar available when more stable - stay tuned)


Saturday, October 31, 2009
CASE STUDY - TOKYO
                          CABINET/TYRANT




                              http://github.com/jperras/tyrannical
                             (I will make zip/tar available when more stable - stay tuned)


Saturday, October 31, 2009
Non-relational stores are not relational.




Saturday, October 31, 2009
So don’t try to force the interface to
                                        be relational.




Saturday, October 31, 2009
DESIGNING A NON-
         RELATIONAL DATASOURCE


                    Favour simplicity over transparency

                             Don’t try to implement everything that the
                             MySQL driver implements

                    Use the strengths of the alternative store




Saturday, October 31, 2009
Example Use Cases




Saturday, October 31, 2009
KEY/VALUE STORES


                    Most have atomic increment/decrement operations
                             Great for API rate limiters (e.g. 300 API reqs/hour/account)


                    Counts & sums of normalized data
                             Most popular items, votes, ratings, some statistics


                    And more.




Saturday, October 31, 2009
DOCUMENT STORES

                    Filesystem objects (pdfs, images, excel sheets etc.) -
                    stored as document attachments (size limited).
                             Allows you to reduce reliance on shared filesystems (NFS)


                    Address book

                    Volatile schema situations

                    CouchDB has a very interesting feature set



Saturday, October 31, 2009
There are many, many use cases.




Saturday, October 31, 2009
Thanks to the DataSource adapter implementation
           in CakePHP, creating a model-based interface is simple.




Saturday, October 31, 2009
Thank you!




                                                     @jperras
                                         http://nerderati.com
                                   http://github.com/jperras
Saturday, October 31, 2009
CODE
                  Divan - CouchDB datasource

                  Yantra - State Machine component for application control flow

                  CakPHP TextMate Bundle

                  CakeMate - TextMate/Vim Plugin

                  Tyrannical - Tokyo Tyrant datasource

                        Originally by Martin Samson (pyrolian@gmail.com)

                        Working to improve code - commits coming soon.

                  Currently working on a framework-agnostic, distributed, plugin/library server.



Saturday, October 31, 2009
Ad

More Related Content

Viewers also liked (19)

NoSQL support in Informix (JSON storage, Mongo DB API)
NoSQL support in Informix (JSON storage, Mongo DB API)NoSQL support in Informix (JSON storage, Mongo DB API)
NoSQL support in Informix (JSON storage, Mongo DB API)
Keshav Murthy
 
Processing Complex Workflows in Advertising using Hadoop
Processing Complex Workflows in Advertising using HadoopProcessing Complex Workflows in Advertising using Hadoop
Processing Complex Workflows in Advertising using Hadoop
DataWorks Summit
 
Spring Data Neo4j Intro SpringOne 2012
Spring Data Neo4j Intro SpringOne 2012Spring Data Neo4j Intro SpringOne 2012
Spring Data Neo4j Intro SpringOne 2012
jexp
 
NoSQL Plus MySQL From MySQL Practitioner\'s Point Of View
NoSQL Plus MySQL From MySQL Practitioner\'s Point Of ViewNoSQL Plus MySQL From MySQL Practitioner\'s Point Of View
NoSQL Plus MySQL From MySQL Practitioner\'s Point Of View
Alex Esterkin
 
NoSQL, Growing up at Oracle
NoSQL, Growing up at OracleNoSQL, Growing up at Oracle
NoSQL, Growing up at Oracle
DATAVERSITY
 
Automated Schema Design for NoSQL Databases
Automated Schema Design for NoSQL DatabasesAutomated Schema Design for NoSQL Databases
Automated Schema Design for NoSQL Databases
Michael Mior
 
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
NoSQLmatters
 
7 Databases in 70 minutes
7 Databases in 70 minutes7 Databases in 70 minutes
7 Databases in 70 minutes
Karen Lopez
 
NoSE: Schema Design for NoSQL Applications
NoSE: Schema Design for NoSQL ApplicationsNoSE: Schema Design for NoSQL Applications
NoSE: Schema Design for NoSQL Applications
Michael Mior
 
Distribute Key Value Store
Distribute Key Value StoreDistribute Key Value Store
Distribute Key Value Store
Santal Li
 
VLDB 2009 Tutorial on Column-Stores
VLDB 2009 Tutorial on Column-StoresVLDB 2009 Tutorial on Column-Stores
VLDB 2009 Tutorial on Column-Stores
Daniel Abadi
 
Neo4j Graph Database Presentation (German)
Neo4j Graph Database Presentation (German)Neo4j Graph Database Presentation (German)
Neo4j Graph Database Presentation (German)
jexp
 
NoSQL Database: Classification, Characteristics and Comparison
NoSQL Database: Classification, Characteristics and ComparisonNoSQL Database: Classification, Characteristics and Comparison
NoSQL Database: Classification, Characteristics and Comparison
Mayuree Srikulwong
 
NoSQL and Data Modeling for Data Modelers
NoSQL and Data Modeling for Data ModelersNoSQL and Data Modeling for Data Modelers
NoSQL and Data Modeling for Data Modelers
Karen Lopez
 
Big data key-value and column stores redis - cassandra
Big data  key-value and column stores redis - cassandraBig data  key-value and column stores redis - cassandra
Big data key-value and column stores redis - cassandra
JWORKS powered by Ordina
 
Software Developer and Architecture @ LinkedIn (QCon SF 2014)
Software Developer and Architecture @ LinkedIn (QCon SF 2014)Software Developer and Architecture @ LinkedIn (QCon SF 2014)
Software Developer and Architecture @ LinkedIn (QCon SF 2014)
Sid Anand
 
9b. Document-Oriented Databases lab
9b. Document-Oriented Databases lab9b. Document-Oriented Databases lab
9b. Document-Oriented Databases lab
Fabio Fumarola
 
8b. Column Oriented Databases Lab
8b. Column Oriented Databases Lab8b. Column Oriented Databases Lab
8b. Column Oriented Databases Lab
Fabio Fumarola
 
Graphdatenbanken mit Neo4j
Graphdatenbanken mit Neo4jGraphdatenbanken mit Neo4j
Graphdatenbanken mit Neo4j
Java Usergroup Berlin-Brandenburg
 
NoSQL support in Informix (JSON storage, Mongo DB API)
NoSQL support in Informix (JSON storage, Mongo DB API)NoSQL support in Informix (JSON storage, Mongo DB API)
NoSQL support in Informix (JSON storage, Mongo DB API)
Keshav Murthy
 
Processing Complex Workflows in Advertising using Hadoop
Processing Complex Workflows in Advertising using HadoopProcessing Complex Workflows in Advertising using Hadoop
Processing Complex Workflows in Advertising using Hadoop
DataWorks Summit
 
Spring Data Neo4j Intro SpringOne 2012
Spring Data Neo4j Intro SpringOne 2012Spring Data Neo4j Intro SpringOne 2012
Spring Data Neo4j Intro SpringOne 2012
jexp
 
NoSQL Plus MySQL From MySQL Practitioner\'s Point Of View
NoSQL Plus MySQL From MySQL Practitioner\'s Point Of ViewNoSQL Plus MySQL From MySQL Practitioner\'s Point Of View
NoSQL Plus MySQL From MySQL Practitioner\'s Point Of View
Alex Esterkin
 
NoSQL, Growing up at Oracle
NoSQL, Growing up at OracleNoSQL, Growing up at Oracle
NoSQL, Growing up at Oracle
DATAVERSITY
 
Automated Schema Design for NoSQL Databases
Automated Schema Design for NoSQL DatabasesAutomated Schema Design for NoSQL Databases
Automated Schema Design for NoSQL Databases
Michael Mior
 
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
NoSQLmatters
 
7 Databases in 70 minutes
7 Databases in 70 minutes7 Databases in 70 minutes
7 Databases in 70 minutes
Karen Lopez
 
NoSE: Schema Design for NoSQL Applications
NoSE: Schema Design for NoSQL ApplicationsNoSE: Schema Design for NoSQL Applications
NoSE: Schema Design for NoSQL Applications
Michael Mior
 
Distribute Key Value Store
Distribute Key Value StoreDistribute Key Value Store
Distribute Key Value Store
Santal Li
 
VLDB 2009 Tutorial on Column-Stores
VLDB 2009 Tutorial on Column-StoresVLDB 2009 Tutorial on Column-Stores
VLDB 2009 Tutorial on Column-Stores
Daniel Abadi
 
Neo4j Graph Database Presentation (German)
Neo4j Graph Database Presentation (German)Neo4j Graph Database Presentation (German)
Neo4j Graph Database Presentation (German)
jexp
 
NoSQL Database: Classification, Characteristics and Comparison
NoSQL Database: Classification, Characteristics and ComparisonNoSQL Database: Classification, Characteristics and Comparison
NoSQL Database: Classification, Characteristics and Comparison
Mayuree Srikulwong
 
NoSQL and Data Modeling for Data Modelers
NoSQL and Data Modeling for Data ModelersNoSQL and Data Modeling for Data Modelers
NoSQL and Data Modeling for Data Modelers
Karen Lopez
 
Big data key-value and column stores redis - cassandra
Big data  key-value and column stores redis - cassandraBig data  key-value and column stores redis - cassandra
Big data key-value and column stores redis - cassandra
JWORKS powered by Ordina
 
Software Developer and Architecture @ LinkedIn (QCon SF 2014)
Software Developer and Architecture @ LinkedIn (QCon SF 2014)Software Developer and Architecture @ LinkedIn (QCon SF 2014)
Software Developer and Architecture @ LinkedIn (QCon SF 2014)
Sid Anand
 
9b. Document-Oriented Databases lab
9b. Document-Oriented Databases lab9b. Document-Oriented Databases lab
9b. Document-Oriented Databases lab
Fabio Fumarola
 
8b. Column Oriented Databases Lab
8b. Column Oriented Databases Lab8b. Column Oriented Databases Lab
8b. Column Oriented Databases Lab
Fabio Fumarola
 

Similar to Non-Relational Databases & Key/Value Stores (20)

Performance Strategies
Performance StrategiesPerformance Strategies
Performance Strategies
Alexander Meindl
 
Distribute the workload, PHP Barcelona 2011
Distribute the workload, PHP Barcelona 2011Distribute the workload, PHP Barcelona 2011
Distribute the workload, PHP Barcelona 2011
Helgi Þormar Þorbjörnsson
 
SASS: The Next Wave in Styling and Theming
SASS: The Next Wave in Styling and ThemingSASS: The Next Wave in Styling and Theming
SASS: The Next Wave in Styling and Theming
Sencha
 
Object Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsObject Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And Applications
PerconaPerformance
 
Wave Presentation
Wave PresentationWave Presentation
Wave Presentation
bedney
 
Building A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage SolutionBuilding A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage Solution
Phil Cryer
 
Non-Technical Introduction to CrossRef for Libraries
Non-Technical Introduction to CrossRef for LibrariesNon-Technical Introduction to CrossRef for Libraries
Non-Technical Introduction to CrossRef for Libraries
Crossref
 
Hands on with Ruby & MongoDB
Hands on with Ruby & MongoDBHands on with Ruby & MongoDB
Hands on with Ruby & MongoDB
Wynn Netherland
 
Content Management Selection and Strategy
Content Management Selection and StrategyContent Management Selection and Strategy
Content Management Selection and Strategy
Ivo Jansch
 
Ibuildings Cms Talk
Ibuildings Cms TalkIbuildings Cms Talk
Ibuildings Cms Talk
dean1985
 
Processing
ProcessingProcessing
Processing
Cate Huston
 
Scaling websites with RabbitMQ A(rlvaro Videla)
Scaling websites with RabbitMQ   A(rlvaro Videla)Scaling websites with RabbitMQ   A(rlvaro Videla)
Scaling websites with RabbitMQ A(rlvaro Videla)
Ontico
 
Accelerate Your Rails Site with Automatic Generation-Based Action Caching
Accelerate Your Rails Site with Automatic Generation-Based Action CachingAccelerate Your Rails Site with Automatic Generation-Based Action Caching
Accelerate Your Rails Site with Automatic Generation-Based Action Caching
elliando dias
 
Smalltalk Metaprogramming supports Probabilistic Program Analysis
Smalltalk Metaprogramming supports Probabilistic Program AnalysisSmalltalk Metaprogramming supports Probabilistic Program Analysis
Smalltalk Metaprogramming supports Probabilistic Program Analysis
ESUG
 
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
JAX London
 
Agile Development with PHP in Practice
Agile Development with PHP in PracticeAgile Development with PHP in Practice
Agile Development with PHP in Practice
Lars Jankowfsky
 
How to Install, Use, and Customize Drush
How to Install, Use, and Customize DrushHow to Install, Use, and Customize Drush
How to Install, Use, and Customize Drush
Acquia
 
IUT presentation - English
IUT presentation - EnglishIUT presentation - English
IUT presentation - English
Raymond Gao
 
It's the Customer, Not the Container
It's the Customer, Not the ContainerIt's the Customer, Not the Container
It's the Customer, Not the Container
john wilbanks
 
OWLED2009: A platform for distributing and reasoning with OWL-EL knowledge ba...
OWLED2009: A platform for distributing and reasoning with OWL-EL knowledge ba...OWLED2009: A platform for distributing and reasoning with OWL-EL knowledge ba...
OWLED2009: A platform for distributing and reasoning with OWL-EL knowledge ba...
Michel Dumontier
 
SASS: The Next Wave in Styling and Theming
SASS: The Next Wave in Styling and ThemingSASS: The Next Wave in Styling and Theming
SASS: The Next Wave in Styling and Theming
Sencha
 
Object Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsObject Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And Applications
PerconaPerformance
 
Wave Presentation
Wave PresentationWave Presentation
Wave Presentation
bedney
 
Building A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage SolutionBuilding A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage Solution
Phil Cryer
 
Non-Technical Introduction to CrossRef for Libraries
Non-Technical Introduction to CrossRef for LibrariesNon-Technical Introduction to CrossRef for Libraries
Non-Technical Introduction to CrossRef for Libraries
Crossref
 
Hands on with Ruby & MongoDB
Hands on with Ruby & MongoDBHands on with Ruby & MongoDB
Hands on with Ruby & MongoDB
Wynn Netherland
 
Content Management Selection and Strategy
Content Management Selection and StrategyContent Management Selection and Strategy
Content Management Selection and Strategy
Ivo Jansch
 
Ibuildings Cms Talk
Ibuildings Cms TalkIbuildings Cms Talk
Ibuildings Cms Talk
dean1985
 
Scaling websites with RabbitMQ A(rlvaro Videla)
Scaling websites with RabbitMQ   A(rlvaro Videla)Scaling websites with RabbitMQ   A(rlvaro Videla)
Scaling websites with RabbitMQ A(rlvaro Videla)
Ontico
 
Accelerate Your Rails Site with Automatic Generation-Based Action Caching
Accelerate Your Rails Site with Automatic Generation-Based Action CachingAccelerate Your Rails Site with Automatic Generation-Based Action Caching
Accelerate Your Rails Site with Automatic Generation-Based Action Caching
elliando dias
 
Smalltalk Metaprogramming supports Probabilistic Program Analysis
Smalltalk Metaprogramming supports Probabilistic Program AnalysisSmalltalk Metaprogramming supports Probabilistic Program Analysis
Smalltalk Metaprogramming supports Probabilistic Program Analysis
ESUG
 
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
JAX London
 
Agile Development with PHP in Practice
Agile Development with PHP in PracticeAgile Development with PHP in Practice
Agile Development with PHP in Practice
Lars Jankowfsky
 
How to Install, Use, and Customize Drush
How to Install, Use, and Customize DrushHow to Install, Use, and Customize Drush
How to Install, Use, and Customize Drush
Acquia
 
IUT presentation - English
IUT presentation - EnglishIUT presentation - English
IUT presentation - English
Raymond Gao
 
It's the Customer, Not the Container
It's the Customer, Not the ContainerIt's the Customer, Not the Container
It's the Customer, Not the Container
john wilbanks
 
OWLED2009: A platform for distributing and reasoning with OWL-EL knowledge ba...
OWLED2009: A platform for distributing and reasoning with OWL-EL knowledge ba...OWLED2009: A platform for distributing and reasoning with OWL-EL knowledge ba...
OWLED2009: A platform for distributing and reasoning with OWL-EL knowledge ba...
Michel Dumontier
 
Ad

Recently uploaded (20)

AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Ad

Non-Relational Databases & Key/Value Stores

  • 1. NON-RELATIONAL DATABASES Saturday, October 31, 2009
  • 2. @JPERRAS - JOEL PERRAS Canadian Geek Blog: http://nerderati.com GitHub: http://github.com/jperras CakePHP Core since Early 2009, PHP dev. since 2001 McGill University, Montréal, Canada - Physics, Mathematics & Computer Science Employer: Plank Design (http://plankdesign.com) (Twitter: @plankdesign) Saturday, October 31, 2009
  • 3. RELATIONAL DATABASES Many different vendors: MySQL, PostgreSQL, SQLite, Oracle, ... Same basic implementation: B(+)-Trees for pages B(+)-Trees or hash tables for secondary indexes Possibly R-Trees for spatial indexes Saturday, October 31, 2009
  • 4. WHAT THEY’RE GOOD AT Saturday, October 31, 2009
  • 5. Schemas (relational models) Familiar BCNF structure Strong consistency Transactions Very “mature” & well tested (mostly) Easy adoption/integration Saturday, October 31, 2009
  • 6. RDBMS’ES ARE NOT GOING ANYWHERE FriendFeed Wikipedia Google AdWords Facebook Saturday, October 31, 2009
  • 7. Most small to medium size applications will never need to go beyond a single database server. Saturday, October 31, 2009
  • 8. Always try and follow the Golden Web Application Development Rule: Saturday, October 31, 2009
  • 9. DON’T TRY TO SOLVE A PROBLEM YOU DON’T HAVE Saturday, October 31, 2009
  • 10. The web has created new problem domains in data storage and querying. Saturday, October 31, 2009
  • 11. MODERN WEB APPS Often use variable schemas Optional fields: contact lists, addresses, favourite movies/books, etc. NULL-itis: null values should not be permitted in BCNF, but are everywhere in web applications. Saturday, October 31, 2009
  • 12. MODERN WEB APPS ‘Social’ apps => high write/read ratios Complex Many-to-Many relationships Joins become a problem in federated architectures Eventual consistency is usually acceptable Downtime unacceptable Saturday, October 31, 2009
  • 14. RULES OF APP AGING http://push.cx/2009/rules-of-database-app-aging 1. All fields become optional 2. All relationships become many-to-many 3. Chatter (comments explaining hacks) grows with time. Saturday, October 31, 2009
  • 15. SOME GOOD PROBLEMS TO HAVE Even if they are “Hard” ones to solve. Saturday, October 31, 2009
  • 16. Load Balancing (you can only live with one machine for so long) Saturday, October 31, 2009
  • 17. High Availability (because disks fail, and replication fails) Saturday, October 31, 2009
  • 18. What’s a web application developer to do? Saturday, October 31, 2009
  • 19. Alternative Data Storage Solutions Saturday, October 31, 2009
  • 20. Not a silver bullet. These can solve some problems, but cause others and have their own limitations. It’s up to you to weigh the cost/benefit of your chosen solution. Saturday, October 31, 2009
  • 21. THE LANDSCAPE Key/Value Stores/Distributed Hash Tables (DHT) Document-oriented databases Column-oriented databases Saturday, October 31, 2009
  • 22. KEY/VALUE STORES Voldemort Scalaris Tokyo Cabinet Redis MemcacheDB Saturday, October 31, 2009
  • 23. DOCUMENT ORIENTED DATA STORES CouchDB <- (my favourite!) MongoDB SimpleDB (Amazon) Saturday, October 31, 2009
  • 24. COLUMN-ORIENTED STORES BigTable (Google) HBase (Hadoop Database) Hypertable (BigTable Open Source clone) Cassandra (Facebook) Saturday, October 31, 2009
  • 25. How do we use these technologies alongside CakePHP ? Saturday, October 31, 2009
  • 26. This year’s magical word: DataSources Saturday, October 31, 2009
  • 27. CASE STUDY - COUCHDB http://github.com/jperras/divan (I will make zip/tar available when more stable - stay tuned) Saturday, October 31, 2009
  • 28. CASE STUDY - TOKYO CABINET/TYRANT http://github.com/jperras/tyrannical (I will make zip/tar available when more stable - stay tuned) Saturday, October 31, 2009
  • 29. Non-relational stores are not relational. Saturday, October 31, 2009
  • 30. So don’t try to force the interface to be relational. Saturday, October 31, 2009
  • 31. DESIGNING A NON- RELATIONAL DATASOURCE Favour simplicity over transparency Don’t try to implement everything that the MySQL driver implements Use the strengths of the alternative store Saturday, October 31, 2009
  • 32. Example Use Cases Saturday, October 31, 2009
  • 33. KEY/VALUE STORES Most have atomic increment/decrement operations Great for API rate limiters (e.g. 300 API reqs/hour/account) Counts & sums of normalized data Most popular items, votes, ratings, some statistics And more. Saturday, October 31, 2009
  • 34. DOCUMENT STORES Filesystem objects (pdfs, images, excel sheets etc.) - stored as document attachments (size limited). Allows you to reduce reliance on shared filesystems (NFS) Address book Volatile schema situations CouchDB has a very interesting feature set Saturday, October 31, 2009
  • 35. There are many, many use cases. Saturday, October 31, 2009
  • 36. Thanks to the DataSource adapter implementation in CakePHP, creating a model-based interface is simple. Saturday, October 31, 2009
  • 37. Thank you! @jperras http://nerderati.com http://github.com/jperras Saturday, October 31, 2009
  • 38. CODE Divan - CouchDB datasource Yantra - State Machine component for application control flow CakPHP TextMate Bundle CakeMate - TextMate/Vim Plugin Tyrannical - Tokyo Tyrant datasource Originally by Martin Samson ([email protected]) Working to improve code - commits coming soon. Currently working on a framework-agnostic, distributed, plugin/library server. Saturday, October 31, 2009