More Related Content
Similar to NoSQL and SQL - blending the best of both worlds (20)
More from Andrew Morgan (12)
NoSQL and SQL - blending the best of both worlds
- 2. Safe Harbour Statement
The following is intended to outline our general product direction. It is
intended for information purposes only, and may not be incorporated into any
contract.
It is not a commitment to deliver any material, code, or functionality, and
should not be relied upon in making purchasing decisions. The development,
release, and timing of any features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 3. What NoSQL must deliver
Massive scalability
Scalability
No application-level sharding
Performance Performance
High Availability/Fault Tolerance
HA
Ease of use
Ease of use Simple operations/administration
Simple APIs
Quickly evolve application & schema
3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 4. Still a role for the RDBMS?
No best single solution
fits all NoSQL RDBMS
Mix and match
Simple access patterns Complex queries with joins
Scalability
Compromise on consistency
Performance ACID transactions
for performance
HA
Ad-hoc data format Well defined schemas
Ease of use
SQL/Joins Simple operation Rich set of tools
ACID Transactions
4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 5. Scalability
MySQL Cluster Architecture Performance
HA
Ease of use
Clients SQL/Joins a
ACID Transactions a
Application Layer
Data Layer
Management
MySQL Cluster Data Nodes
5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 6. Scalability a
MySQL Cluster Architecture Performance
HA
Ease of use
Clients SQL/Joins a
ACID Transactions a
Application Layer
Data Layer
Management
Management
MySQL Cluster Data Nodes
6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 7. Scalability a
MySQL Cluster Architecture Performance
HA a
Ease of use
Clients SQL/Joins a
ACID Transactions a
Application Layer
Data Layer
Management
Management
MySQL Cluster Data Nodes
7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 8. 1.2 Billion UPDATEs per Minute
25
Millions of UPDATEs per Second
20
• 30 x Intel E5-2600 Intel
Servers
15
• NoSQL C++ API,
flexaSynch benchmark 10
• ACID Transactions, with 5
Synchronous
Replication 0
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
MySQL Cluster Data Nodes
8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 9. Scalability a
Performance a
HA a
Ease of use
SQL/Joins a
ACID Transactions a
9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 10. 10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 11. Creating & running your first Cluster
The traditional way (pre-MCM) – Up and running in 15 mins
Download & Configure Start processes
Extract •Cluster-wide •Management Nodes
•edelivery.oracle.com “config.ini” •Data Nodes
•www.mysql.com •Per-mysqld “my.cnf” •MySQL Servers
•dev.mysql.com
•Labs.mysql.com
Up & running in 10-15 minutes using Quick Start guides from http://dev.mysql.com/downloads/cluster/
– Versions for Linux, Windows & Solaris
11 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 12. Scalability a
Performance a
HA a
Ease of use a
SQL/Joins a
ACID Transactions a
12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 13. MySQL Cluster Manager
Bootstrap single host Cluster
1. Download MCM/Cluster package from edelivery.oracle.com:
2. Unzip
3. Run agent, define, create & start Cluster!
$> binmcmd --bootstrap
MySQL Cluster Manager 1.1.2 started
Connect to MySQL Cluster Manager by running "D:AndrewDocumentsMySQLmcmbinmcm" -a NOVA:1862
Configuring default cluster 'mycluster'...
Starting default cluster 'mycluster'...
Cluster 'mycluster' started successfully
ndb_mgmd NOVA:1186
ndbd NOVA
ndbd NOVA
mysqld NOVA:3306
mysqld NOVA:3307
ndbapi *
Connect to the database by running "D:AndrewDocumentsMySQLmcmclusterbinmysql" -h NOVA -P 3306 -u root
13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 14. MySQL Cluster 7.3 EA: Auto-Installer
Fast configuration Specify Auto-
Workload Discover
Auto-discovery
Workload optimized
Repeatable best
practices
For MySQL Cluster Define
Deploy Topology
7.2 + 7.3
14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 15. Downloading MySQL Cluster EA
http://labs.mysql.com/
15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 16. Scalability a
Performance a
HA a
Ease of use a
SQL/Joins a
ACID Transactions a
16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 17. 17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 18. MySQL Cluster 7.1: ClusterJ/JPA
• Domain Object Model Persistence API (ClusterJ):
• Java API
• High performance, low latency
• Feature rich
• JPA interface built upon this new Java layer:
• Java Persistence API compliant
• Implemented as an OpenJPA plugin
• Uses ClusterJ where possible, reverts to JDBC for
some operations
• Higher performance than JDBC
• More natural for most Java designers
• Easier Cluster adoption for web applications
18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 19. MySQL Cluster 7.2: Memcached
• Memcached is a distributed memory based hash-
key/value store with no persistence to disk
• NoSQL, simple API, popular with developers
• MySQL Cluster already provides scalable, in-
memory performance with NoSQL (hashed) access
as well as persistence
• Provide the Memcached API but map to NDB
API calls
• Writes-in-place, so no need to invalidate cache
• Simplifies architecture as caching & database
integrated into 1 tier
• Access data from existing relational tables
19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 20. Cluster & Memcached – Schema-Free
key value
<town:maidenhead,SL6>
Application view
SQL view key value
<town:maidenhead,SL6>
Key Value
town:maidenhead SL6
generic table
20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 21. Cluster & Memcached – Configured Schema
key value
<town:maidenhead,SL6>
Application view
SQL view prefix key value
<town:maidenhead,SL6>
Prefix Table Key-col Val-col policy town ... code ...
town: map.zip town code cluster maidenhead ... SL6 ...
Config tables map.zip
21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 22. Memcached NoSQL Access with InnoDB
• Memcached as a plugin of
MySQL Server; same
Application
process space, with very low
latency access to data
• Memcapable: supports both SQL Memcached protocol
mysqld
memcached ascii protocol
and binary protocol
MySQL Server memcached plugin
• Support multiple columns:
users can map multiple
local cache
columns into “value” innodb_memcache
(optional)
• Optional local caching: Handler API InnoDB API
“innodb-only”, “cache-only”,
and “caching” InnoDB Storage Engine
• Batch operations for
performance
22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 23. MySQL Cluster 7.3 EA: Node.js NoSQL API
Native JavaScript access to MySQL Cluster
– End-to-End JavaScript: browser to the app and
Clients database
– Storing and retrieving JavaScript objects directly
in MySQL Cluster
– Eliminate SQL transformation
V8 JavaScript Engine Implemented as a module for node.js
MySQL Cluster Node.js Module – Integrates full Cluster API library within the web
app
Couple high performance, distributed apps, with
high performance distributed database
MySQL Cluster Data Nodes
23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 24. Try Node.js example for yourself
https://github.com/mysql/mysql-js/tree/master/samples
24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release
- 25. Next Steps
Learn More
• www.mysql.com/cluster
• Authentic MySQL Curriculum:
http://oracle.com/education/mysql
Try it Out
• dev.mysql.com/cluster
• labs.mysql.com
• github.com/mysql/mysql-js
Let us know what you think
• clusterdb.com
• @clusterdb
• forums.mysql.com/list.php?25
25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 3 rd Feb 2013 | Oracle reserves the right to change the timing and content of any future release