MySQL & NoSQL: The Best of Both Worlds

Similar documents
MySQL Cluster Web Scalability, % Availability. Andrew

<Insert Picture Here> MySQL Cluster What are we working on

MySQL High Availability

Building Highly Available and Scalable Real- Time Services with MySQL Cluster

NoSQL and SQL: The Best of Both Worlds

MySQL Cluster for Real Time, HA Services

<Insert Picture Here> MySQL Web Reference Architectures Building Massively Scalable Web Infrastructure

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

MySQL HA Solutions Selecting the best approach to protect access to your data

State of the Dolphin Developing new Apps in MySQL 8

MySQL as a Document Store. Ted Wennmark

Using the MySQL Document Store

Everything You Need to Know About MySQL Group Replication

MySQL Cluster Student Guide

What s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

InnoDB: Status, Architecture, and Latest Enhancements

MySQL Group Replication. Bogdan Kecman MySQL Principal Technical Engineer

MySQL High Availability. Michael Messina Senior Managing Consultant, Rolta-AdvizeX /

Welcome to Virtual Developer Day MySQL!

MySQL CLUSTER. Low latency for a real-time user experience; 24 x 7 availability for continuous service uptime;

Jargons, Concepts, Scope and Systems. Key Value Stores, Document Stores, Extensible Record Stores. Overview of different scalable relational systems

<Insert Picture Here> Oracle NoSQL Database A Distributed Key-Value Store

MySQL InnoDB Cluster. MySQL HA Made Easy! Miguel Araújo Senior Software Developer MySQL Middleware and Clients. FOSDEM 18 - February 04, 2018

MySQL CLUSTER. Low latency for a real-time user experience. 24 x 7 availability for continuous service uptime

Building a Scalable Architecture for Web Apps - Part I (Lessons Directi)

MySQL Architecture Design Patterns for Performance, Scalability, and Availability

Oracle NoSQL Database Enterprise Edition, Version 18.1

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

Accelerate Database Performance and Reduce Response Times in MongoDB Humongous Environments with the LSI Nytro MegaRAID Flash Accelerator Card

Safe Harbor Statement

<Insert Picture Here> Looking at Performance - What s new in MySQL Workbench 6.2

Oracle NoSQL Database Enterprise Edition, Version 18.1

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

Introduction to MySQL Cluster: Architecture and Use

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8

Consolidate and Prepare for Cloud Efficiencies Oracle Database 12c Oracle Multitenant Option

CIS 601 Graduate Seminar. Dr. Sunnie S. Chung Dhruv Patel ( ) Kalpesh Sharma ( )

Realtime visitor analysis with Couchbase and Elasticsearch

Group Replication: A Journey to the Group Communication Core. Alfranio Correia Principal Software Engineer

5/2/16. Announcements. NoSQL Motivation. The New Hipster: NoSQL. Serverless. What is the Problem? Database Systems CSE 414

Database Systems CSE 414

MySQL Cluster Ed 2. Duration: 4 Days

New Oracle NoSQL Database APIs that Speed Insertion and Retrieval

Introduction to MySQL InnoDB Cluster

Agenda. AWS Database Services Traditional vs AWS Data services model Amazon RDS Redshift DynamoDB ElastiCache

MySQL and Virtualization Guide

MariaDB MaxScale 2.0, basis for a Two-speed IT architecture

Oracle Exadata: Strategy and Roadmap

MySQL Replication Update

MySQL for Database Administrators Ed 3.1

Modern Development With MySQL

Safe Harbor Statement

Oracle Database Mobile Server, Version 12.2

Architecture of a Real-Time Operational DBMS

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

10/18/2017. Announcements. NoSQL Motivation. NoSQL. Serverless Architecture. What is the Problem? Database Systems CSE 414

NoSQL + SQL = MySQL. Nicolas De Rico Principal Solutions Architect

VoltDB vs. Redis Benchmark

SQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability

NOSQL DATABASE CLOUD SERVICE. Flexible Data Models. Zero Administration. Automatic Scaling.

MySQL Cluster Scaling to Billion Database Queries with MySQL Cluster. Bernd Ocklin MySQL Cluster Engineering

Performance comparisons and trade-offs for various MySQL replication schemes

MySQL Performance Tuning 101

WLS Neue Optionen braucht das Land

Transformation-free Data Pipelines by combining the Power of Apache Kafka and the Flexibility of the ESB's

Oracle NoSQL Database at OOW 2017

Do-It-Yourself 1. Oracle Big Data Appliance 2X Faster than

Mix n Match Async and Group Replication for Advanced Replication Setups. Pedro Gomes Software Engineer

Pimp My Data Grid. Brian Oliver Senior Principal Solutions Architect <Insert Picture Here>

What's New in MySQL 5.7?

Hadoop 2.x Core: YARN, Tez, and Spark. Hortonworks Inc All Rights Reserved

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Connecting your Microservices and Cloud Services with Oracle Integration CON7348

Creating Ultra-fast Realtime Apps and Microservices with Java. Markus Kett, CEO Jetstream Technologies

Oracle SQL Developer & REST Data Services

<Insert Picture Here> Introduction to MySQL

Switching to Innodb from MyISAM. Matt Yonkovit Percona

Upgrading to MySQL 8.0+: a More Automated Upgrade Experience. Dmitry Lenev, Software Developer Oracle/MySQL, November 2018

Oracle Database 18c and Autonomous Database

Building Real-time Data in Web Applications with Node.js

A memcached implementation in Java. Bela Ban JBoss 2340

Oracle WebCenter Portal Performance Tuning

Solaris Engineered Systems

MySQL Group Replication in a nutshell

Javaentwicklung in der Oracle Cloud

Oracle Database Exadata Cloud Service Exadata Performance, Cloud Simplicity DATABASE CLOUD SERVICE

State of MySQL Group Replication


A Brief Introduction of TiDB. Dongxu (Edward) Huang CTO, PingCAP

Data pipelines with PostgreSQL & Kafka

Application-Tier In-Memory Analytics Best Practices and Use Cases

Introduction. Architecture Overview

Hibernate Search Googling your persistence domain model. Emmanuel Bernard Doer JBoss, a division of Red Hat

Improving Altibase Performance with Solarflare 10GbE Server Adapters and OpenOnload

Continuous delivery of Java applications. Marek Kratky Principal Sales Consultant Oracle Cloud Platform. May, 2016

MySQL High Availability Solutions. Alex Poritskiy Percona

<Insert Picture Here> What's New for.net Developers for Oracle Database

Introduction to MySQL NDB Cluster. Yves Trudeau Ph. D. Percona Live DC/January 2012

Oracle TimesTen In-Memory Database 18.1

Design Patterns for Large- Scale Data Management. Robert Hodges OSCON 2013

Transcription:

MySQL & NoSQL: The Best of Both Worlds Mario Beck Principal Sales Consultant MySQL mario.beck@oracle.com 1 Copyright 2012, Oracle and/or its affiliates. All rights

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 2012, Oracle and/or its affiliates. All rights

Session Agenda NoSQL What are people looking for? RDBMS What advantages do they still have? How MySQL Delivers the Best of Both Worlds MySQL Cluster NoSQL attributes: Scale-out, performance, ease-of-use, schema flexibility, on-line operations NoSQL APIs Key-Value store access to InnoDB (Memcached) What is coming with future releases 3 Copyright 2012, Oracle and/or its affiliates. All rights

What NoSQL must deliver Massive scalability No application-level sharding Performance High Availability/Fault Tolerance Ease of use Simple operations/administration Simple APIs Quickly evolve application & schema Scalability Performance HA Ease of use 4 Copyright 2012, Oracle and/or its affiliates. All rights

Still a role for the RDBMS? NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation RDBMS Complex queries with joins ACID transactions Well defined schemas Rich set of tools No best single solution fits all Mix and match Scalability Performance HA Ease of use SQL/Joins ACID Transactions 5 Copyright 2012, Oracle and/or its affiliates. All rights

MySQL Cluster introduction 6 Copyright 2012, Oracle and/or its affiliates. All rights

Node 2 Node 4 Node 1 Node 3 MySQL Cluster Architecture REST Application Nodes Scalability Performance Node Group 1 Node Group 2 HA Ease of use Cluster Mgr F1 F3 F2 F4 Cluster Mgr SQL/Joins ACID Transactions a a F3 F4 F1 Data Nodes F2 7 Copyright 2012, Oracle and/or its affiliates. All rights

MySQL Cluster: Extensive Choice of NoSQL APIs Mix & Match 8 Copyright 2012, Oracle and/or its affiliates. All rights Copyright 2013, Oracle and/or its affiliates. All rights

Millions of UPDATEs per Second 25 1.2 Billion UPDATEs per Minute 20 15 10 5 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 MySQL Cluster Data Nodes NoSQL C++ API, flexasynch benchmark 30 x Intel E5-2600 Intel Servers, 2 socket, 64GB ACID Transactions, with Synchronous Replication 9 Copyright 2012, Oracle and/or its affiliates. All rights Copyright 2013, Oracle and/or its affiliates. All rights

Node 2 Node 4 Node 1 Node 3 MySQL Cluster Architecture http://clusterdb.com/u/demo REST Application Nodes Scalability Performance Node Group 1 Node Group 2 HA Ease of use a Cluster Mgr F1 F3 F2 F4 Cluster Mgr SQL/Joins ACID Transactions a a F3 F4 F1 Data Nodes F2 10 Copyright 2012, Oracle and/or its affiliates. All rights

Scale-Out: Auto-Partitioning Table T1 Data Node 1 P1 P2 P3 P4 Data Node 2 Data Node 3 Data Node 4 11 Copyright 2012, Oracle and/or its affiliates. All rights

Scale-Out: Auto-Partitioning Table T1 Data Node 1 F1 P1 P2 P3 P4 Data Node 2 Data Node 3 Data Node 4 12 Copyright 2012, Oracle and/or its affiliates. All rights

Scale-Out: Auto-Partitioning Table T1 Data Node 1 F1 P1 P2 P3 P4 Data Node 2 Data Node 3 F1 Data Node 4 13 Copyright 2012, Oracle and/or its affiliates. All rights

Scale-Out: Auto-Partitioning Table T1 Data Node 1 F1 P1 P2 P3 P4 Data Node 2 F3 F1 Data Node 3 Data Node 4 14 Copyright 2012, Oracle and/or its affiliates. All rights

Scale-Out: Auto-Partitioning Table T1 Data Node 1 F1 F3 P1 P2 P3 P4 Data Node 2 F3 F1 Data Node 3 Data Node 4 15 Copyright 2012, Oracle and/or its affiliates. All rights

Scale-Out: Auto-Partitioning Table T1 Data Node 1 F1 F3 P1 P2 P3 P4 Data Node 2 F3 F1 Data Node 3 F2 F4 Data Node 4 F4 F2 Node Group 1 Node Group 2 16 Copyright 2012, Oracle and/or its affiliates. All rights

Scale-Out: Auto-Partitioning Table T1 Data Node 1 F1 F3 P1 P2 P3 P4 Data Node 2 F3 F1 Data Node 3 F2 F4 Data Node 4 F4 F2 Node Group 1 Node Group 2 17 Copyright 2012, Oracle and/or its affiliates. All rights

Scale-Out: Auto-Partitioning Table T1 P1 P2 P3 P4 Scalability Performance HA Ease of use SQL/Joins ACID Transactions a a a a 18 Copyright 2012, Oracle and/or its affiliates. All rights

Millions Millions 1,200 1,000 800 600 400 200 0 120 100 80 60 Scale-Out Reads & Writes on Commodity Hardware SELECT Queries per Minute 2 4 8 Number of Data Nodes UPDATE Queries per Minute 40 20 0 4 8 Number of Data Nodes 8 x Commodity Intel Servers 2 x 6-core processors 2.93GHz x5670 processors (24 threads) 48GB RAM Infiniband networking flexasynch benchmark (NDB API) 19 Copyright 2012, Oracle and/or its affiliates. All rights

On-line Schema changes On-Line Operations Scale the cluster (add & remove nodes on-line) Repartition tables Upgrade / patch servers & OS Upgrade / patch MySQL Cluster Back-Up Evolve the schema on-line, in real-time 20 Copyright 2012, Oracle and/or its affiliates. All rights

Scalability Performance HA Ease of use SQL/Joins ACID Transactions a a a a a a 21 Copyright 2012, Oracle and/or its affiliates. All rights

NoSQL Access to MySQL Cluster data Mix & Match! Same data accessed simultaneously through SQL & NoSQL interfaces 22 Copyright 2012, Oracle and/or its affiliates. All rights

MySQL Cluster 7.1: ClusterJ/JPA New 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 23 Copyright 2012, Oracle and/or its affiliates. All rights

ClusterJ High Performance, Easy to Use In the style of Hibernate / JPA / JDO Domain Object Model DataMapper pattern Data is represented as domain objects Domain objects are separate from business logic Domain objects are mapped to database tables Built on ndbjtie JNI adapter integral part of MySQL Cluster Straight mapping of MySQL Cluster API (a.k.a NDB API) to Java Does not support relationships Look at JDO / JPA for these modelling patterns 24 Copyright 2012, Oracle and/or its affiliates. All rights

NoSQL with Memcached (MySQL Cluster 7.2) Memcached is a distributed memory based hashkey/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 25 Copyright 2012, Oracle and/or its affiliates. All rights

Java Access Performance http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster_connector_for_java.php 26 Copyright 2012, Oracle and/or its affiliates. All rights

Traditional Memcached Architecture Two levels of hashing httpd PHP/Perl Memcache friends:12389 memcache key memcached memcached memcached hash key to find data 27 Copyright 2012, Oracle and/or its affiliates. All rights

Cache hit httpd PHP/Perl Memcache friends:12389 memcached VALUE friends:12389 0 31\r\n 101, 11009, 11150, 55881, 77798 \r\n hash key to find data 28 Copyright 2012, Oracle and/or its affiliates. All rights

Cache miss (1): fetch from DB httpd PHP/Perl Memcache mysql memcached hash key to find data MySQL Slave 29 Copyright 2012, Oracle and/or its affiliates. All rights

Cache miss (2): manage cache httpd PHP/Perl Memcache memcached hash key to find data 30 Copyright 2012, Oracle and/or its affiliates. All rights

Data change (1): Write to DB httpd PHP/Perl mysql MySQL Master INSERT INTO user_friends (user_id, friend_id) VALUES ( 12389, 999101); 31 Copyright 2012, Oracle and/or its affiliates. All rights

Data change (2): manage cache httpd PHP/Perl memcached mysql MySQL Master 32 Copyright 2012, Oracle and/or its affiliates. All rights

NoSQL with Memcached Flexible: Deployment options Multiple Clusters Simultaneous SQL Access Can still cache in Memcached server Flat key-value store or map to multiple tables/columns set maidenhead 0 0 3 SL6 STORED get maidenhead VALUE maidenhead 0 3 SL6 END 33 Copyright 2012, Oracle and/or its affiliates. All rights

Cluster & Memcached Schema-Free Application view SQL view key value <town:maidenhead,sl6> key value <town:maidenhead,sl6> Key Value town:maidenhead SL6 generic table 34 Copyright 2012, Oracle and/or its affiliates. All rights

Cluster & Memcached - Configured Schema Application view SQL view key value <town:maidenhead,sl6> prefix key value <town:maidenhead,sl6> Prefix Table Key-col Val-col policy town: map.zip town code cluster pop: map.zip town popul cluster Config tables town... code popul maidenhead... SL6... map.zip 35 Copyright 2012, Oracle and/or its affiliates. All rights

Memcached with MySQL Cluster Try it out http://clusterdb.com/u/memcached 36 Copyright 2012, Oracle and/or its affiliates. All rights

Memcached NoSQL Access with InnoDB mysqld SQL MySQL Server Handler API Application Memcached protocol memcached plugin innodb_memcache InnoDB API InnoDB Storage Engine local cache (optional) Memcached as a plugin of MySQL Server; same process space, with very low latency access to data Memcapable: supports both memcached ascii protocol and binary protocol Support multiple columns: users can map multiple columns into value Optional local caching: innodb-only, cache-only, and caching Batch operations for performance Available from in MySQL 5.6 37 Copyright 2012, Oracle and/or its affiliates. All rights

TPS Performance 80000 MySQL 5.6: NoSQL Benchmarking 70000 60000 50000 40000 30000 20000 10000 Memcached API SQL 16 GB, Intel Xeon 2.0 GHz CPU X86_64 2 CPUs- 4 Core Each, 2 RAID DISKS 0 8 32 128 512 Client Connections Up to 9x Higher SET / INSERT Throughput 38 Copyright 2012, Oracle and/or its affiliates. All rights Copyright 2013, Oracle and/or its affiliates. All rights

InnoDB & Memcached - Configured Schema key value <@@town:maidenhead,sl6:12000> Application view SQL view prefix key value <town:maidenhead,sl6:12000> name schema table keycol valcols flags town map city town code,popul country world state code name,capital Config tables town... code popul maidenhead... SL6 12000 map.city 39 Copyright 2012, Oracle and/or its affiliates. All rights

Which API to use? 40 Copyright 2012, Oracle and/or its affiliates. All rights

Scalability Performance HA Ease of use SQL/Joins ACID Transactions a a a a a a 41 Copyright 2012, Oracle and/or its affiliates. All rights

MySQL Cluster 7.3 DMR: Node.js NoSQL API Native JavaScript access to MySQL Cluster End-to-End JavaScript: browser to the app and V8 JavaScript Engine MySQL Cluster Node.js Module MySQL Cluster Data Nodes Clients database Storing and retrieving JavaScript objects directly in MySQL Cluster Eliminate SQL transformation Implemented as a module for node.js Integrates full Cluster API library within the web app Couple high performance, distributed apps, with high performance distributed database 42 Copyright 2012, Oracle and/or its affiliates. All rights

What does an asynchronous API mean? Get on with other stuff Get on with other stuff do_stuff1(data, callback1) callback1(results) do_stuff2(data, callback2) callback2(results) 43 Copyright 2012, Oracle and/or its affiliates. All rights

MySQL Cluster NoSQL API for Node.js var nosql = require('mysql-js'); var annotations = new nosql.annotations(); annotations.mapclass(lib.tweet, {'table' : 'tweet'}); var dbproperties = nosql.connectionproperties('ndb'); nosql.opensession(dbproperties, annotations, onsession); Modular connector with various back-end adapters: ndb: low-level native access to MySQL Cluster mysql: access to any MySQL server (translates operations to SQL statements) 44 Copyright 2012, Oracle and/or its affiliates. All rights

MySQL Cluster NoSQL API for Node.js var onsession = function(err, session) { }; if (err) { } else { } var data = new lib.tweet(user_args[0], user_args[1]); session.persist(data, oninsert, data); 45 Copyright 2012, Oracle and/or its affiliates. All rights

var oninsert = function(err, object) { }; MySQL Cluster NoSQL API for Node.js console.log('oninsert.'); if (err) { } else { } console.log('inserted: ' + JSON.stringify(object)); 46 Copyright 2012, Oracle and/or its affiliates. All rights

Try Node.js example for yourself https://github.com/mysql/mysql-js/tree/master/samples 47 Copyright 2012, Oracle and/or its affiliates. All rights

Industry Leaders Rely on MySQL Web & Enterprise OEM & ISVs Cloud 48 Copyright 2012, Oracle and/or its affiliates. All rights

Summary Today s web workloads demand more from databases Performance, scale-out, simples access patterns & APIs MySQL meets these needs while still delivering benefits of an ACID RDBMS 49 Copyright 2012, Oracle and/or its affiliates. All rights

Next Steps Guide to MySQL and NoSQL - Delivering the Best of Both Worlds http://mysql.com/why-mysql/white-papers/mysql-wp-guide-tonosql.php Evaluate MySQL Cluster 7.2 http://www.mysql.com/downloads/cluster/ Bootstrap a Cluster https://edelivery.oracle.com/ Try Memcached API for InnoDB in 5.6 http://www.mysql.com/downloads/ 50 Copyright 2012, Oracle and/or its affiliates. All rights

San Francisco, September 21-23 Additional Day of Tutorials Oracle.com/mysqlconnect Graphic Section Divider Keynotes Conferences Sessions 51 Copyright 2012, Oracle and/or its affiliates. All rights Birds-of-a-feather sessions Tutorials Hands-on Labs Exhibition Hall Demo Pods Receptions

Thank you! 52 Copyright 2012, Oracle and/or its affiliates. All rights Copyright 2012, Oracle and/or its affiliates. All rights