SlideShare a Scribd company logo
NoSQL and SQL: The Best of Both
Worlds
Andrew Morgan
@andrewmorgan
clusterdb.com
1st February 2015
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 2
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 3
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 4
Graph Database
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 5
NoSQL
Simple access patterns
Compromise on consistency
for performance
Ad-hoc data format
Simple operation
SQL
Complex queries with joins
ACID transactions
Well defined schemas
Rich set of tools
Still a role for SQL (RDBMS)?
Scalability
Performance
HA
Ease of use
SQL/Joins
ACID Transactions
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6
The Temptation to Jettison Relational Model
• Relational Model:
– Data stored in multiple tables
– Many lookups to retrieve a user’s
timeline
– Is it worth the effort in setting up
this complex data model?
• Simpler just to store as one
document?
The allure of document stores
Examples borrowed from @sarahmei https://speakerdeck.com/sarahmei/switching-data-stores-a-postmodern-comedy
user
friend
post
comment
like
liker
commenter
many
many
many
one
one
many
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 7
The Temptation to Jettison Relational Model
• Document Model:
– Entire timeline in a single
document (row)
– Single lookup to retrieve the
user’s timeline
– Brilliantly efficient model when
the document truly contains self-
contained information
• Like a real-world document!
The allure of document stores
{name: ‘Joe’,
url: ‘http://clusterdb.com’,
stream:[
{friend:{
name: ‘Jane’,
posts:[{content: ‘…’,
comments:[
{comment: ‘…’,
commenter: ‘Joe’},
{…}
],
likes: [‘Joe’, ‘Fred’, ‘Billy’]
},
{…},{…},…
]
}, {…},{…},…
}
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 8
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 9
The Temptation to Jettison Relational Model
• These are all people who have
their own data that users will
want to view or click through:
– Name
– url
– Timeline
• Easy to represent with FKs in a
relational model
But when the data isn’t self contained…
user
friend
post
comment
like
liker
commenter
many
many
many
one
one
many
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 10
The Temptation to Jettison Relational Model
• Do I store all data for all friends
and likers again at every point they
appear in the document?
• Massive amount of repeated data
– Wasted space
– Needs to be kept in sync (and you don’t
have transactions to provide
consistency)
The allure of document stores
{name: ‘Joe’,
url: ‘http://clusterdb.com’,
stream:[
{friend:{
name: ‘Jane’,
posts:[{content: ‘…’,
comments:[
{comment: ‘…’,
commenter: ‘Joe’},
{…}
],
likes: [‘Joe’, ‘Fred’, ‘Billy’]
},
{…},{…},…
]
}, {…},{…},…
}
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 11
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 12
The Temptation to Jettison Relational Model
• The reality is that the developer
will store the user-ids instead
• Developer is responsible for
implementing ‘joins’ in the
application
– e.g. scanning all timelines for where a
user made a comment or liked a post
• No transactions to ensure
consistency between documents
The allure of document stores
{name: 83746251,
url: ‘…’
stream:[
{friend:{
name: 9384726153,
posts:[{content: ‘…’,
comments:[
{comment: ‘…’,
commenter: 83746251},
{…}
],
likes: [83746251, 750730283,
2938493820]
},
{…},{…},…
]
}, {…},{…},…
}
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 13
The Temptation to Jettison Relational Model
• Each attribute’s labels are stored in
every document
– More wasted space
– Developers compensate by replacing
with short names
The allure of document stores
{n5: 83746251,
u2: ‘…’
s1:[
{f2:{
n5: 9384726153,
p4:[{c4: ‘…’,
c3:[
{c2: ‘…’,
c8: 83746251},
{…}
],
l5: [83746251, 750730283,
2938493820]
},
{…},{…},…
]
}, {…},{…},…
}
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 14
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 15
MySQL Cluster Overview
• In-Memory Optimization + Disk-Data
• Predictable Low-Latency, Bounded Access Time
REAL-TIME
• Auto-Sharding, Multi-Master
• ACID Compliant, OLTP + Real-Time Analytics
HIGH SCALE, READS +
WRITES
• Shared nothing, no Single Point of Failure
• Self Healing + On-Line Operations
99.999% AVAILABILITY
• Key/Value + Complex, Relational Queries
• SQL + Memcached + JavaScript + Java + HTTP/REST & C++
SQL + NoSQL
• Open Source + Commercial Editions
• Commodity hardware + Management, Monitoring Tools
LOW TCO
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 16
MySQL Cluster Architecture
MySQL Cluster Data Nodes
Clients
Application Layer
Data Layer
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 17
MySQL Cluster Scaling
MySQL Cluster Data Nodes
Clients
Application Layer
Data Layer
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 18
MySQL Cluster HA
MySQL Cluster Data Nodes
Clients
Application Layer
Data Layer
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 19
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 20
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 21
1.2 Billion UPDATEs per Minute
• Distributed Joins also
possible
0
5
10
15
20
25
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
MillionsofUPDATEsperSecond
MySQL Cluster Data Nodes
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 22
Scalability a
Performance a
HA a
Ease of use
SQL/Joins a
ACID Transactions a
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 23
Scalability a
Performance a
HA a
Ease of use a
SQL/Joins a
ACID Transactions a
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 24
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 25
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 26
NoSQL Access to MySQL Cluster data
Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps
JPA
Cluster JPA
PHP Perl Python Ruby JDBC Cluster J JS Apache Memcached
MySQL JNI Node.JS mod_ndb ndb_eng
NDB API (C++)
MySQL Cluster Data Nodes
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 27
Cluster & Memcached – Schema-Free
<town:maidenhead,SL6>
key value
<town:maidenhead,SL6>
key value
Key Value
town:maidenhead SL6
generic table
Application view
SQL view
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 28
Cluster & Memcached - Configured Schema
<town:maidenhead,SL6>
prefix key value
<town:maidenhead,SL6>
key value
Prefix Table Key-col Val-col policy
town: map.zip town code cluster
Config tables
town ... code ...
maidenhead ... SL6 ...
map.zip
Application view
SQL view
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 29
NoSQL API for Node.js & FKs
FKs enforced on all APIs:
{ message: 'Error',
sqlstate: '23000',
ndb_error: null,
cause:
{message: 'Foreign key constraint violated: No parent row found [255]',
sqlstate: '23000',
ndb_error:
{ message: 'Foreign key constraint violated: No parent row found',
code: 255,
classification: 'ConstraintViolation',
handler_error_code: 151,
status: 'PermanentError' },
cause: null } }
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 30
Next Steps
Learn More
• www.mysql.com/cluster
• Authentic MySQL Curriculum: http://oracle.com/education/mysql
Try it Out
• dev.mysql.com/downloads/cluster/
Let us know what you think
• clusterdb.com
• @clusterdb
• forums.mysql.com/list.php?25
1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 31

More Related Content

PPTX
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
PPTX
What's new in MySQL Cluster 7.4 webinar charts
PDF
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
PDF
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
ODP
MySQL HA Alternatives 2010
PDF
MySQL Document Store - A Document Store with all the benefts of a Transactona...
PPTX
Data Streaming with Apache Kafka & MongoDB - EMEA
PDF
MySQL Cluster performance best practices
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
What's new in MySQL Cluster 7.4 webinar charts
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL HA Alternatives 2010
MySQL Document Store - A Document Store with all the benefts of a Transactona...
Data Streaming with Apache Kafka & MongoDB - EMEA
MySQL Cluster performance best practices

What's hot (20)

PDF
MySQL for Software-as-a-Service (SaaS)
PPTX
PASS Summit - SQL Server 2017 Deep Dive
PDF
MySQL Intro JSON NoSQL
PDF
MySQL Manchester TT - 5.7 Whats new
PDF
Successful MySQL Scalability
PDF
MySQL Tech Tour 2015 - Alt Intro
PPTX
2019 - OOW - Database Migration Methods from On-Premise to Cloud
PPTX
Bridging Oracle Database and Hadoop by Alex Gorbachev, Pythian from Oracle Op...
PDF
Open Innovation with Power Systems
PDF
Mysql Enterprise Edition Feature and Tools
PPTX
Mysql ecosystem in 2019
PPTX
The rise of microservices - containers and orchestration
PPTX
Accelerating Business Intelligence Solutions with Microsoft Azure pass
PPT
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
PDF
MySQL Manchester TT - Replication Features
PPTX
SQL Server on Linux - march 2017
PPTX
Expert summit SQL Server 2016
PDF
Temporal Tables, Transparent Archiving in DB2 for z/OS and IDAA
PDF
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
PDF
MySQL Enterprise Edition Overview
MySQL for Software-as-a-Service (SaaS)
PASS Summit - SQL Server 2017 Deep Dive
MySQL Intro JSON NoSQL
MySQL Manchester TT - 5.7 Whats new
Successful MySQL Scalability
MySQL Tech Tour 2015 - Alt Intro
2019 - OOW - Database Migration Methods from On-Premise to Cloud
Bridging Oracle Database and Hadoop by Alex Gorbachev, Pythian from Oracle Op...
Open Innovation with Power Systems
Mysql Enterprise Edition Feature and Tools
Mysql ecosystem in 2019
The rise of microservices - containers and orchestration
Accelerating Business Intelligence Solutions with Microsoft Azure pass
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Manchester TT - Replication Features
SQL Server on Linux - march 2017
Expert summit SQL Server 2016
Temporal Tables, Transparent Archiving in DB2 for z/OS and IDAA
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
MySQL Enterprise Edition Overview
Ad

Viewers also liked (15)

PDF
No sql with mysql cluster (MyNA・JPUG合同DB勉強会)
PPTX
MongoDB 3.4 webinar
PPT
MySQL Cluster Basics
PDF
Seminar : &quot;The Future of MySQL - Roadmap to Success&quot; session MySQL ...
PDF
Seminar : &quot;The Future of MYSQL - Roadmap to Success&quot; session MySQL...
PDF
Seminar : &quot;The Future of MySQL - Roadmap to Success&quot; session MySQL ...
PPT
Building a Scalable Architecture for web apps
PDF
Mysql cluster introduction
PDF
MySQL Developer Day conference: MySQL Replication and Scalability
PDF
NoSQL and SQL - blending the best of both worlds
PPTX
MySQL High Availability Solutions - Feb 2015 webinar
PDF
Best practices for MySQL High Availability
PPT
7 Stages of Scaling Web Applications
PPTX
Facebook architecture presentation: scalability challenge
PDF
Architecture of a Modern Web App
No sql with mysql cluster (MyNA・JPUG合同DB勉強会)
MongoDB 3.4 webinar
MySQL Cluster Basics
Seminar : &quot;The Future of MySQL - Roadmap to Success&quot; session MySQL ...
Seminar : &quot;The Future of MYSQL - Roadmap to Success&quot; session MySQL...
Seminar : &quot;The Future of MySQL - Roadmap to Success&quot; session MySQL ...
Building a Scalable Architecture for web apps
Mysql cluster introduction
MySQL Developer Day conference: MySQL Replication and Scalability
NoSQL and SQL - blending the best of both worlds
MySQL High Availability Solutions - Feb 2015 webinar
Best practices for MySQL High Availability
7 Stages of Scaling Web Applications
Facebook architecture presentation: scalability challenge
Architecture of a Modern Web App
Ad

Similar to FOSDEM 2015 - NoSQL and SQL the best of both worlds (20)

PPTX
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
PDF
NoSQL no MySQL 5.7
PDF
MySQL 5.7 como Document Store
PDF
NoSQL and MySQL
PDF
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
PDF
Unlocking Big Data Insights with MySQL
PDF
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
PDF
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
PDF
Unlocking big data with Hadoop + MySQL
PDF
01 demystifying mysq-lfororacledbaanddeveloperv1
PDF
NoSQL and MySQL: News about JSON
PDF
Ohio Linux Fest -- MySQL's NoSQL
PDF
20141011 my sql clusterv01pptx
PDF
MySQL Cluster
PDF
1 architecture & design
PDF
My sql cluster case study apr16
PDF
MySQL 8.0 - What's New ?
PDF
Migrating from Oracle to Postgres
 
PDF
MySQL Manchester TT - Performance Tuning
PDF
MySQL as a Document Store
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
NoSQL no MySQL 5.7
MySQL 5.7 como Document Store
NoSQL and MySQL
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
Unlocking Big Data Insights with MySQL
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
Unlocking big data with Hadoop + MySQL
01 demystifying mysq-lfororacledbaanddeveloperv1
NoSQL and MySQL: News about JSON
Ohio Linux Fest -- MySQL's NoSQL
20141011 my sql clusterv01pptx
MySQL Cluster
1 architecture & design
My sql cluster case study apr16
MySQL 8.0 - What's New ?
Migrating from Oracle to Postgres
 
MySQL Manchester TT - Performance Tuning
MySQL as a Document Store

More from Andrew Morgan (7)

PPTX
Powering Microservices with MongoDB, Docker, Kubernetes & Kafka – MongoDB Eur...
PPTX
PistonHead's use of MongoDB for Analytics
PPTX
Joins and Other MongoDB 3.2 Aggregation Enhancements
PPTX
Document validation in MongoDB 3.2
PDF
MySQL Replication: What’s New in MySQL 5.7 and Beyond
PDF
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
PDF
Developing high-throughput services with no sql ap-is to innodb and mysql clu...
Powering Microservices with MongoDB, Docker, Kubernetes & Kafka – MongoDB Eur...
PistonHead's use of MongoDB for Analytics
Joins and Other MongoDB 3.2 Aggregation Enhancements
Document validation in MongoDB 3.2
MySQL Replication: What’s New in MySQL 5.7 and Beyond
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
Developing high-throughput services with no sql ap-is to innodb and mysql clu...

Recently uploaded (20)

PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
history of c programming in notes for students .pptx
PPTX
L1 - Introduction to python Backend.pptx
PDF
System and Network Administration Chapter 2
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPT
Introduction Database Management System for Course Database
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
AI in Product Development-omnex systems
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Digital Strategies for Manufacturing Companies
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
System and Network Administraation Chapter 3
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms II-SECS-1021-03
history of c programming in notes for students .pptx
L1 - Introduction to python Backend.pptx
System and Network Administration Chapter 2
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Introduction Database Management System for Course Database
Which alternative to Crystal Reports is best for small or large businesses.pdf
AI in Product Development-omnex systems
Online Work Permit System for Fast Permit Processing
Digital Strategies for Manufacturing Companies
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Odoo Companies in India – Driving Business Transformation.pdf
Operating system designcfffgfgggggggvggggggggg
Adobe Illustrator 28.6 Crack My Vision of Vector Design
System and Network Administraation Chapter 3
CHAPTER 2 - PM Management and IT Context
Upgrade and Innovation Strategies for SAP ERP Customers
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
ManageIQ - Sprint 268 Review - Slide Deck
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

FOSDEM 2015 - NoSQL and SQL the best of both worlds

  • 1. NoSQL and SQL: The Best of Both Worlds Andrew Morgan @andrewmorgan clusterdb.com 1st February 2015 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
  • 2. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 2
  • 3. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 3
  • 4. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 4
  • 5. Graph Database 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 5
  • 6. NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation SQL Complex queries with joins ACID transactions Well defined schemas Rich set of tools Still a role for SQL (RDBMS)? Scalability Performance HA Ease of use SQL/Joins ACID Transactions 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6
  • 7. The Temptation to Jettison Relational Model • Relational Model: – Data stored in multiple tables – Many lookups to retrieve a user’s timeline – Is it worth the effort in setting up this complex data model? • Simpler just to store as one document? The allure of document stores Examples borrowed from @sarahmei https://speakerdeck.com/sarahmei/switching-data-stores-a-postmodern-comedy user friend post comment like liker commenter many many many one one many 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 7
  • 8. The Temptation to Jettison Relational Model • Document Model: – Entire timeline in a single document (row) – Single lookup to retrieve the user’s timeline – Brilliantly efficient model when the document truly contains self- contained information • Like a real-world document! The allure of document stores {name: ‘Joe’, url: ‘http://clusterdb.com’, stream:[ {friend:{ name: ‘Jane’, posts:[{content: ‘…’, comments:[ {comment: ‘…’, commenter: ‘Joe’}, {…} ], likes: [‘Joe’, ‘Fred’, ‘Billy’] }, {…},{…},… ] }, {…},{…},… } 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 8
  • 9. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 9
  • 10. The Temptation to Jettison Relational Model • These are all people who have their own data that users will want to view or click through: – Name – url – Timeline • Easy to represent with FKs in a relational model But when the data isn’t self contained… user friend post comment like liker commenter many many many one one many 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 10
  • 11. The Temptation to Jettison Relational Model • Do I store all data for all friends and likers again at every point they appear in the document? • Massive amount of repeated data – Wasted space – Needs to be kept in sync (and you don’t have transactions to provide consistency) The allure of document stores {name: ‘Joe’, url: ‘http://clusterdb.com’, stream:[ {friend:{ name: ‘Jane’, posts:[{content: ‘…’, comments:[ {comment: ‘…’, commenter: ‘Joe’}, {…} ], likes: [‘Joe’, ‘Fred’, ‘Billy’] }, {…},{…},… ] }, {…},{…},… } 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 11
  • 12. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 12
  • 13. The Temptation to Jettison Relational Model • The reality is that the developer will store the user-ids instead • Developer is responsible for implementing ‘joins’ in the application – e.g. scanning all timelines for where a user made a comment or liked a post • No transactions to ensure consistency between documents The allure of document stores {name: 83746251, url: ‘…’ stream:[ {friend:{ name: 9384726153, posts:[{content: ‘…’, comments:[ {comment: ‘…’, commenter: 83746251}, {…} ], likes: [83746251, 750730283, 2938493820] }, {…},{…},… ] }, {…},{…},… } 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 13
  • 14. The Temptation to Jettison Relational Model • Each attribute’s labels are stored in every document – More wasted space – Developers compensate by replacing with short names The allure of document stores {n5: 83746251, u2: ‘…’ s1:[ {f2:{ n5: 9384726153, p4:[{c4: ‘…’, c3:[ {c2: ‘…’, c8: 83746251}, {…} ], l5: [83746251, 750730283, 2938493820] }, {…},{…},… ] }, {…},{…},… } 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 14
  • 15. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 15
  • 16. MySQL Cluster Overview • In-Memory Optimization + Disk-Data • Predictable Low-Latency, Bounded Access Time REAL-TIME • Auto-Sharding, Multi-Master • ACID Compliant, OLTP + Real-Time Analytics HIGH SCALE, READS + WRITES • Shared nothing, no Single Point of Failure • Self Healing + On-Line Operations 99.999% AVAILABILITY • Key/Value + Complex, Relational Queries • SQL + Memcached + JavaScript + Java + HTTP/REST & C++ SQL + NoSQL • Open Source + Commercial Editions • Commodity hardware + Management, Monitoring Tools LOW TCO 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 16
  • 17. MySQL Cluster Architecture MySQL Cluster Data Nodes Clients Application Layer Data Layer 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 17
  • 18. MySQL Cluster Scaling MySQL Cluster Data Nodes Clients Application Layer Data Layer 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 18
  • 19. MySQL Cluster HA MySQL Cluster Data Nodes Clients Application Layer Data Layer 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 19
  • 20. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 20
  • 21. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 21
  • 22. 1.2 Billion UPDATEs per Minute • Distributed Joins also possible 0 5 10 15 20 25 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 MillionsofUPDATEsperSecond MySQL Cluster Data Nodes 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 22 Scalability a Performance a HA a Ease of use SQL/Joins a ACID Transactions a
  • 23. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 23
  • 24. Scalability a Performance a HA a Ease of use a SQL/Joins a ACID Transactions a 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 24
  • 25. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 25
  • 26. 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 26
  • 27. NoSQL Access to MySQL Cluster data Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps Apps JPA Cluster JPA PHP Perl Python Ruby JDBC Cluster J JS Apache Memcached MySQL JNI Node.JS mod_ndb ndb_eng NDB API (C++) MySQL Cluster Data Nodes 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 27
  • 28. Cluster & Memcached – Schema-Free <town:maidenhead,SL6> key value <town:maidenhead,SL6> key value Key Value town:maidenhead SL6 generic table Application view SQL view 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 28
  • 29. Cluster & Memcached - Configured Schema <town:maidenhead,SL6> prefix key value <town:maidenhead,SL6> key value Prefix Table Key-col Val-col policy town: map.zip town code cluster Config tables town ... code ... maidenhead ... SL6 ... map.zip Application view SQL view 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 29
  • 30. NoSQL API for Node.js & FKs FKs enforced on all APIs: { message: 'Error', sqlstate: '23000', ndb_error: null, cause: {message: 'Foreign key constraint violated: No parent row found [255]', sqlstate: '23000', ndb_error: { message: 'Foreign key constraint violated: No parent row found', code: 255, classification: 'ConstraintViolation', handler_error_code: 151, status: 'PermanentError' }, cause: null } } 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 30
  • 31. Next Steps Learn More • www.mysql.com/cluster • Authentic MySQL Curriculum: http://oracle.com/education/mysql Try it Out • dev.mysql.com/downloads/cluster/ Let us know what you think • clusterdb.com • @clusterdb • forums.mysql.com/list.php?25 1/2/2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 31