NoSQL & SQLBlending the best of both worldsAndrew Morgan (@andrewmorgan)www.clusterdb.com15th June 2013
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to chang...
Upcoming SlideShare
Loading in...5
×

NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013

593

Published on

Quick explanation of MySQL Cluster and how it can meet the requirements that typically push people towards NoSQL data stores while still providing SQL and the advantages of an ACID relational database

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
593
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013

  1. 1. NoSQL & SQLBlending the best of both worldsAndrew Morgan (@andrewmorgan)www.clusterdb.com15th June 2013
  2. 2. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release2Safe Harbour StatementThe following is intended to outline our general product direction. It isintended for information purposes only, and may not be incorporated into anycontract.It is not a commitment to deliver any material, code, or functionality, andshould not be relied upon in making purchasing decisions. The development,release, and timing of any features or functionality described for Oracle’sproducts remains at the sole discretion of Oracle.
  3. 3. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release3 Massive scalability No application-level sharding Performance High Availability/Fault Tolerance Ease of use Simple operations/administration Simple APIs Quickly evolve application & schemaWhat NoSQL must deliverScalabilityPerformanceHAEase of use
  4. 4. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release4 No best single solutionfits all Mix and matchStill a role for the RDBMS?NoSQLSimple access patternsCompromise on consistencyfor performanceAd-hoc data formatSimple operationRDBMSComplex queries with joinsACID transactionsWell defined schemasRich set of toolsScalabilityPerformanceHAEase of useSQL/JoinsACID Transactions
  5. 5. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release5MySQL Cluster ArchitectureMySQL Cluster Data NodesData LayerClientsApplication LayerManagementScalabilityPerformanceHAEase of useSQL/Joins aACID Transactions a
  6. 6. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release6MySQL Cluster ArchitectureMySQL Cluster Data NodesData LayerClientsApplication LayerManagementManagementScalability aPerformanceHAEase of useSQL/Joins aACID Transactions a
  7. 7. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release7MySQL Cluster ArchitectureMySQL Cluster Data NodesData LayerApplication LayerManagementManagementClientsScalability aPerformanceHA aEase of useSQL/Joins aACID Transactions a
  8. 8. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release81.2 Billion UPDATEs per Minute• 30 x Intel E5-2600 IntelServers• NoSQL C++ API,flexaSynch benchmark• ACID Transactions, withSynchronousReplication 05101520252 4 6 8 10 12 14 16 18 20 22 24 26 28 30MillionsofUPDATEsperSecondMySQL Cluster Data Nodes
  9. 9. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release9Scalability aPerformance aHA aEase of useSQL/Joins aACID Transactions a
  10. 10. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release10
  11. 11. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release11MySQL Cluster 7.3 DMR: Auto-Installer Fast configuration Auto-discovery Workload optimized Repeatable bestpractices For MySQL Cluster7.2 + 7.3SpecifyWorkloadAuto-DiscoverDefineTopologyDeploy
  12. 12. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release12Scalability aPerformance aHA aEase of use aSQL/Joins aACID Transactions a
  13. 13. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release13
  14. 14. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release14NoSQL Access to MySQL Cluster dataClusterJMySQLJDBCAppsJPAJNIPython RubyClusterJPAApps Apps Apps Apps AppsNode.jsJSAppsmod-ndbApacheAppsndb-engMemcachedApps AppsNDB API (C++)MySQL Cluster Data NodesAppsPHP PERLApps
  15. 15. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release15MySQL Cluster 7.3 EA: Node.js NoSQL API Native JavaScript access to MySQL Cluster– End-to-End JavaScript: browser to the app &DB– Storing and retrieving JavaScript objectsdirectly in MySQL Cluster– Eliminate SQL transformation Implemented as a module for node.js– Integrates Cluster API library within the web app Couple high performance, distributed apps,with high performance distributed database Optionally routes through MySQL ServerV8 JavaScript EngineMySQL Cluster Node.js ModuleMySQL Cluster Data NodesClients
  16. 16. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release16MySQL Cluster 7.3: JavaScript Connector for nodeModular connector withvarious back-endadapters:• ndb: low-level nativeaccess to MySQL Cluster• mysql: access to anyMySQL server (translatesoperations to SQLstatements)var nosql = require(mysql-js);var annotations = newnosql.TableMapping(towns).applyToClass(Town);var dbProperties =nosql.ConnectionProperties(ndb);nosql.openSession(dbProperties,Town, annotations, onSession);Tutorial https://blogs.oracle.com/MySQL/entry/mysql_cluster_tutorial_nosql_api
  17. 17. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release17var onSession = function(err, session) {if (err) {console.log(err);process.exit(0);} else {var data = new Town(Maidenhead,Berkshire);session.persist(data, onInsert, data,session);}};MySQL Cluster NoSQL API for Node.js
  18. 18. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release18var onInsert = function(err, object, session) {if (err) {console.log(err);} else {console.log(Inserted: +JSON.stringify(object));session.find(Town, Maidenhead,onFind);}};MySQL Cluster NoSQL API for Node.js
  19. 19. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release19var onFind = function(err, result) {if (err) {console.log(err);} else {console.log(Found: +JSON.stringify(result));}process.exit(0);};MySQL Cluster NoSQL API for Node.js
  20. 20. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release20MySQL Cluster 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 } }
  21. 21. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release21Cluster & Memcached – Schema-Free<town:maidenhead,SL6>key value<town:maidenhead,SL6>key valueKey Valuetown:maidenhead SL6generic tableApplication viewSQL view
  22. 22. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 15th June 2013 | Oracle reserves the right to change the timing and content of any future release22Cluster & Memcached – Configured Schema<town:maidenhead,SL6>prefix key value<town:maidenhead,SL6>key valuePrefix Table Key-col Val-col policytown: map.zip town code clusterConfig tablestown ... code ...maidenhead ... SL6 ...map.zipApplication viewSQL view

×