SlideShare a Scribd company logo
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
MySQL as a Document Store
Ted Wennmark
ted.wennmark@oracle.com
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Safe Harbor 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
commitmentto 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
functionalitydescribed for Oracle’s products remains at the sole discretion of Oracle.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Program Agenda
MySQL Document Store
MySQL Future
1
2
3
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Program Agenda
MySQL Document Store
MySQL Future
1
2
4
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Today’s Challenges
• Developers want to move faster
• Time to market has a premium value
• Rapid prototyping, iterate fast…
5
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Today’s Challenges (cont.)
• Relational databases ask for schema up front
– Potentiallysaving you time in the future
– Less variations; less code to handle edge cases
– Added cost with each schema change
• NoSQL databases do not ask for schema
– Saving you time up front
– But potentially adding operational costs over time
– No cost per schema change
6
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Why can you not…
• Have both schema-less and schema in the same technology stack?
• One that checks all the boxes of all stakeholders:
7
Developers:
[ x ] Schemaless
[ x ] Rapid Prototyping/SimplerAPIs
[ x ] Document Model
Operations:
[ x ] Performance Management/Visibility
[ x ] Robust Replication, Backup, Restore
[ x ] ComprehensiveTooling Ecosystem
Business Owner:
[ x ] Don’t lose my data = ACID transactions
[ x ] Capture all my data = Extensible/Schemaless
[ x ] ProductsOn Schedule/Timeto Market = Rapid Development
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
NEW! MySQL Document Store
• NativeJSON Documents in MySQL 5.7
– Schema-less Document Storage
• X Protocol (MySQL 5.7.12 DMR)
– Implementedby X Plugin to Extend MySQL Server as a Document Store
• X Dev API
– SQL and Document CRUD Operations
– Implementedin Connector/Node.js,Connector/J,Connector/Net
• MySQL Shell
– Javascript,Python,SQL modes
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Architecture
9
MySQL
Plugins
X ProtocolPlugin MemcachedPlugin
Core
X ProtocolStdProtocol
X Protocol
33060
StdProtocol
3306
SQLAPI CRUD API
X and Std
Protocols
MySQL
Shell
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
New! MySQL X DevAPI
• Modern: fluent API, method chaining
• Stateless sessions enable transparent scaling to multi-server environments
• SQL support
• CRUD for Collections of Documents and Tables
– Documentsas simple basic domain objects
– Search expressions match SQL SELECT expressions
• Implemented in MySQL Shell & MySQL Connectors
– NEW! MySQL Connector/node.js
– MySQLConnector/J
– MySQLConnector/Net
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
New! MySQL Shell
• Integrated Development and Administration Shell
• Exposes New X DevAPI
• Multi-Language scripting
– JavaScript, Python, and SQL
• Configurable results formats
– Traditional Table, JSON, Tab Separated
11
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 12
tomas@localhost $ mysqlsh --uri root@localhost/test
Creatingan X Sessionto root@localhost:33060/test
Enter password:
Default schema `test` accessible through db.
…
Currently in JavaScript mode. Use sql to switch to SQL mode and execute queries.
mysql-js> db.createCollection("posts");
<Collection:posts>
mysql-js> db.posts.add({"title":"Hello World", "text":"First post!"})
Query OK, 1 item affected(0.03 sec)
mysql-js> db.posts.find("title = 'Hello World'").sort(["title"]);
[
{
"_id": "8202bda28206e611140b3229389b6526",
"text": "First post!",
"title": "Hello World"
}
]
1 document in set (0.01 sec)
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 13
Under the Hood
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 14
Collections are tables
Tables with:
- JSON column
- GeneratedColumn
Create a Collection
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Under The Hood II
15
• X-Plugin translatesCRUD -> SQL
• No code changes in core parts of MYSQL
Create Document (CRUD)
Look inside general-log
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Under The Hood III
16
Read Document (CRUD)
Look inside general-log
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
CRUD Operations – NoSQL/Document and SQL/Relational
Operation Document Relational
Create Collection.add() Table.insert()
Read Collection.find() Table.select()
Update Collection.modify() Table.update()
Delete Collection.remove() Table.delete()
17
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
CRUD Operations
NoSQL/Document
Javascript Java
C#NodeJS
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
CRUD Operations
SQL/Relational
19
Javascript Java
C#NodeJS
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
MySQL Document Store
✔ Built on Proven SQL/InnoDB/Replication
✔ Schema-less/Relational/Hybrid
✔ ACID/Transactions
✔ CRUD/JSON/Documents
✔ Modern Dev API
✔ Modern/Efficient Protocol
✔ SQL Queries/Analytics over JSON Documents
✔ Transparent and Easy HA/Scaling/Sharding
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
New! Documentation
• Developer Guides
• Lots of examples
New Style - Developer Focused
21
http://dev.mysql.com/doc/dev/mysqlsh-api-javascript/
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Program Agenda
MySQL Document Store
MySQL Future
1
2
22
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Vision
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
“Be the most popular open source
database for scale-out”
24
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
3 MySQL will focus on three things.
25
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 26
Scale-Out
Ease-of-Use
Out-of-Box
Solution
MySQL
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 27
Ease-of-Use
• Download, Install, HA & Scale-Out in 15 minutes
• Single Interface for Everything MySQL
• Easy to Setup, Scale-Out, Manage & Monitor
• Excellent Quality
MySQL
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 28
Out-of-Box Solution
• Integrated Solution vs. Individual Components
• Designed & Developed Together
• Tested & Delivered Together
• Managed & Monitored Together
MySQL
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 29
Scale-Out
• Maintain World-Class Performance
• Rock Solid, Server-Side HA With Auto-Failover
• Read Scale-Out With Replication
• Write Scale-Out With Sharding
MySQL
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
4 Rollout will happen in four steps.
30
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 31
Read Scale-Out
Async Replication+ Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – 4 Steps
Timeline
MySQLDocumentStore
Relational & Document Model
MySQLHA
Out-Of-BoxHA
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Introducing …
32
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 33
Scale-Out
High Performance
Ease-of-Use
Built-inHA
Out-of-Box Solution
Everything Integrated
MySQL
InnoDB
cluster
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 34
A single product: MySQL
• All componentscreated together
• Tested together
• Packaged together
Flexible and Modern
• C++ 11
• ProtocolBuffers
• Developer friendly
MySQL InnoDB Cluster – Goals
Easy to use
• A single client: MySQL Shell
• Easy packaging
• Homogenousservers
Scale-out
• Sharded clusters
• Federated system of N replica sets
• Each replica set manages a shard
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
MySQL
InnoDB
cluster
MySQL InnoDB Cluster – Architecture - S2
M
M M
MySQLConnector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
Group Replication
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
S1 S2 S3 S4 S…
M
M M
MySQLConnector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
MySQL InnoDB Cluster – Architecture - S3 MySQL
InnoDB
cluster
Read-Only Slaves
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
S1 S2 S3 S4 S…
M
M M
MySQLConnector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
ReplicaSet(Shard1)
S1 S2 S3 S4 S…
M
M M
MySQLConnector
Application
MySQL Router
HA
ReplicaSet(Shard2)
S1 S2 S3
M
M M
H
ReplicaSet(Shard3)
MySQLConnector
Application
MySQL Router
MySQL InnoDB Cluster – Architecture - S4 MySQL
InnoDB
cluster
…
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
MySQLConnector
Application
MySQL Connector
Application
MySQL Shell
MySQLConnector
Application
MySQLConnector
Application
MySQL InnoDB Cluster – Architecture
MySQL
InnoDB
cluster
MySQL Enterprise Monitor
…
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
MySQL
InnoDB
cluster
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Demo
MySQL
InnoDB
cluster
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
MySQL
InnoDB
cluster
MySQL InnoDB Cluster – DEMO
M
M M
Application
MySQL Router
MySQL Connector
Applicaion
MySQL Shell
HA
Group Replication
3310
3320 3330
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 42
The Demo Showed…
• MySQL HA in 4 minutes
• Very easy, even for somebody new to MySQL
• Everything managed through MySQL Shell
• Convenient, easy-to-use AdminAPI
MySQL
InnoDB
cluster
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
1 One seamless solution for HA:
Easy-to-Use, Out-of-Box, Scale-
Out.
43
MySQL
InnoDB
cluster
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
What’s next?
44
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 45
Read Scale-Out
Async Replication+ Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – 4 Steps
Timeline
Download Preview Release from
labs.mysql.com
MySQLDocumentStore
Relational & Document Model
MySQLHA
Out-Of-BoxHA
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Resources
Topic Link(s)
MySQLas a Document Database http://dev.mysql.com/doc/refman/5.7/en/document-database.html
MySQLShell http://dev.mysql.com/doc/refman/5.7/en/mysql-shell.html
http://dev.mysql.com/doc/refman/5.7/en/mysqlx-shell-tutorial-javascript.html
http://dev.mysql.com/doc/refman/5.7/en/mysqlx-shell-tutorial-python.html
X Dev API http://dev.mysql.com/doc/x-devapi-userguide/en/
X Plugin http://dev.mysql.com/doc/refman/5.7/en/x-plugin.html
MySQLJSON http://mysqlserverteam.com/tag/json/
https://dev.mysql.com/doc/refman/5.7/en/json.html
https://dev.mysql.com/doc/refman/5.7/en/json-functions.html
46
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Thank you!

More Related Content

PDF
01 upgrade to my sql8
PDF
MySQL NDB Cluster 8.0
PDF
MySQL Performance - Best practices
PDF
MySQL HA
PDF
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
PDF
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
PPTX
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
PDF
Mysql User Camp : 20th June - Mysql New Features
01 upgrade to my sql8
MySQL NDB Cluster 8.0
MySQL Performance - Best practices
MySQL HA
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
Mysql User Camp : 20th June - Mysql New Features

What's hot (20)

PDF
MySQL InnoDB Cluster and NDB Cluster
PDF
MySQL configuration - The most important Variables
PDF
MariaDB: Connect Storage Engine
ODP
MySQL Enterprise Portfolio
PDF
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
PDF
MySQL 5.7 - What's new, How to upgrade and Document Store
PDF
MySQL Storage Engines
PDF
MySQL 8.0 - What's New ?
PDF
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
PDF
Mining the AWR: Alternative Methods for Identification of the Top SQLs (inclu...
PDF
Maria db 10 and the mariadb foundation(colin)
PPT
MySQL Features & Implementation
ODP
MySQL Cluster
PDF
MySQL 5.7 in a Nutshell
PDF
My sql crashcourse_intro_kdl
PDF
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
PPTX
MySQL Tech Tour 2015 - 5.7 Whats new
PDF
My sql crashcourse_2012
PDF
MySQL Day Paris 2018 - MySQL JSON Document Store
PDF
MySQL cluster 7.4
MySQL InnoDB Cluster and NDB Cluster
MySQL configuration - The most important Variables
MariaDB: Connect Storage Engine
MySQL Enterprise Portfolio
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL Storage Engines
MySQL 8.0 - What's New ?
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
Mining the AWR: Alternative Methods for Identification of the Top SQLs (inclu...
Maria db 10 and the mariadb foundation(colin)
MySQL Features & Implementation
MySQL Cluster
MySQL 5.7 in a Nutshell
My sql crashcourse_intro_kdl
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
MySQL Tech Tour 2015 - 5.7 Whats new
My sql crashcourse_2012
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL cluster 7.4
Ad

Similar to MySQL as a Document Store (20)

PDF
MySQL Day Paris 2016 - MySQL as a Document Store
PDF
MySQL Document Store
PDF
Node.js and the MySQL Document Store
PDF
MySQL Document Store - A Document Store with all the benefts of a Transactona...
PDF
MySQL Document Store and Node.JS
PDF
MySQL Connector/J in the Making of Modern Applications
PDF
MySQL 8.0, what's new ? - Forum PHP 2018
PDF
MySQL Document Store for Modern Applications
PDF
20171104 hk-py con-mysql-documentstore_v1
PDF
MySQL Document Store (Oracle Code Warsaw 2018)
ODP
Doc store
PDF
MySQL Connector/Node.js and the X DevAPI
PDF
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
PPTX
A Step by Step Introduction to the MySQL Document Store
PDF
Oracle Code Event - MySQL JSON Document Store
PDF
MySQL 8 loves JavaScript
PDF
Introduction to MySQL Document Store
ODP
MySQL Without the MySQL -- Oh My!
PDF
MySQL as a Document Store
PPTX
Polyglot Database - Linuxcon North America 2016
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Document Store
Node.js and the MySQL Document Store
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store and Node.JS
MySQL Connector/J in the Making of Modern Applications
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL Document Store for Modern Applications
20171104 hk-py con-mysql-documentstore_v1
MySQL Document Store (Oracle Code Warsaw 2018)
Doc store
MySQL Connector/Node.js and the X DevAPI
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
A Step by Step Introduction to the MySQL Document Store
Oracle Code Event - MySQL JSON Document Store
MySQL 8 loves JavaScript
Introduction to MySQL Document Store
MySQL Without the MySQL -- Oh My!
MySQL as a Document Store
Polyglot Database - Linuxcon North America 2016
Ad

More from Ted Wennmark (13)

PDF
Upgrade to MySQL 8.0!
PDF
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
PDF
MySQL Enterprise Backup apr 2016
PDF
MySQL Security
PDF
MySQL 5.7 Replication News
PDF
MySQL 5.6, news in 5.7 and our HA options
PDF
Introduction to MySQL
PDF
MySQL Fabric - High Availability & Automated Sharding for MySQL
PDF
The MySQL Performance Schema & New SYS Schema
PDF
MySQL Enterprise Monitor
PDF
MySQL@king
PDF
NoSQL and MySQL
PDF
What's new in my sql smug
Upgrade to MySQL 8.0!
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
MySQL Enterprise Backup apr 2016
MySQL Security
MySQL 5.7 Replication News
MySQL 5.6, news in 5.7 and our HA options
Introduction to MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQL
The MySQL Performance Schema & New SYS Schema
MySQL Enterprise Monitor
MySQL@king
NoSQL and MySQL
What's new in my sql smug

Recently uploaded (20)

PPTX
Business Acumen Training GuidePresentation.pptx
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
PPTX
Global journeys: estimating international migration
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPT
Chapter 2 METAL FORMINGhhhhhhhjjjjmmmmmmmmm
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
A Quantitative-WPS Office.pptx research study
PPTX
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Introduction to machine learning and Linear Models
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
IB Computer Science - Internal Assessment.pptx
PDF
Taxes Foundatisdcsdcsdon Certificate.pdf
Business Acumen Training GuidePresentation.pptx
Galatica Smart Energy Infrastructure Startup Pitch Deck
Introduction-to-Cloud-ComputingFinal.pptx
Fluorescence-microscope_Botany_detailed content
Introduction to Knowledge Engineering Part 1
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
Global journeys: estimating international migration
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Chapter 2 METAL FORMINGhhhhhhhjjjjmmmmmmmmm
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
A Quantitative-WPS Office.pptx research study
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
Miokarditis (Inflamasi pada Otot Jantung)
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Introduction to machine learning and Linear Models
Acceptance and paychological effects of mandatory extra coach I classes.pptx
IB Computer Science - Internal Assessment.pptx
Taxes Foundatisdcsdcsdon Certificate.pdf

MySQL as a Document Store

  • 1. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | MySQL as a Document Store Ted Wennmark ted.wennmark@oracle.com
  • 2. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Safe Harbor 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 commitmentto 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 functionalitydescribed for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Program Agenda MySQL Document Store MySQL Future 1 2 3
  • 4. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Program Agenda MySQL Document Store MySQL Future 1 2 4
  • 5. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Today’s Challenges • Developers want to move faster • Time to market has a premium value • Rapid prototyping, iterate fast… 5
  • 6. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Today’s Challenges (cont.) • Relational databases ask for schema up front – Potentiallysaving you time in the future – Less variations; less code to handle edge cases – Added cost with each schema change • NoSQL databases do not ask for schema – Saving you time up front – But potentially adding operational costs over time – No cost per schema change 6
  • 7. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Why can you not… • Have both schema-less and schema in the same technology stack? • One that checks all the boxes of all stakeholders: 7 Developers: [ x ] Schemaless [ x ] Rapid Prototyping/SimplerAPIs [ x ] Document Model Operations: [ x ] Performance Management/Visibility [ x ] Robust Replication, Backup, Restore [ x ] ComprehensiveTooling Ecosystem Business Owner: [ x ] Don’t lose my data = ACID transactions [ x ] Capture all my data = Extensible/Schemaless [ x ] ProductsOn Schedule/Timeto Market = Rapid Development
  • 8. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | NEW! MySQL Document Store • NativeJSON Documents in MySQL 5.7 – Schema-less Document Storage • X Protocol (MySQL 5.7.12 DMR) – Implementedby X Plugin to Extend MySQL Server as a Document Store • X Dev API – SQL and Document CRUD Operations – Implementedin Connector/Node.js,Connector/J,Connector/Net • MySQL Shell – Javascript,Python,SQL modes
  • 9. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Architecture 9 MySQL Plugins X ProtocolPlugin MemcachedPlugin Core X ProtocolStdProtocol X Protocol 33060 StdProtocol 3306 SQLAPI CRUD API X and Std Protocols MySQL Shell
  • 10. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | New! MySQL X DevAPI • Modern: fluent API, method chaining • Stateless sessions enable transparent scaling to multi-server environments • SQL support • CRUD for Collections of Documents and Tables – Documentsas simple basic domain objects – Search expressions match SQL SELECT expressions • Implemented in MySQL Shell & MySQL Connectors – NEW! MySQL Connector/node.js – MySQLConnector/J – MySQLConnector/Net
  • 11. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | New! MySQL Shell • Integrated Development and Administration Shell • Exposes New X DevAPI • Multi-Language scripting – JavaScript, Python, and SQL • Configurable results formats – Traditional Table, JSON, Tab Separated 11
  • 12. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 12 tomas@localhost $ mysqlsh --uri root@localhost/test Creatingan X Sessionto root@localhost:33060/test Enter password: Default schema `test` accessible through db. … Currently in JavaScript mode. Use sql to switch to SQL mode and execute queries. mysql-js> db.createCollection("posts"); <Collection:posts> mysql-js> db.posts.add({"title":"Hello World", "text":"First post!"}) Query OK, 1 item affected(0.03 sec) mysql-js> db.posts.find("title = 'Hello World'").sort(["title"]); [ { "_id": "8202bda28206e611140b3229389b6526", "text": "First post!", "title": "Hello World" } ] 1 document in set (0.01 sec)
  • 13. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 13 Under the Hood
  • 14. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 14 Collections are tables Tables with: - JSON column - GeneratedColumn Create a Collection
  • 15. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Under The Hood II 15 • X-Plugin translatesCRUD -> SQL • No code changes in core parts of MYSQL Create Document (CRUD) Look inside general-log
  • 16. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Under The Hood III 16 Read Document (CRUD) Look inside general-log
  • 17. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | CRUD Operations – NoSQL/Document and SQL/Relational Operation Document Relational Create Collection.add() Table.insert() Read Collection.find() Table.select() Update Collection.modify() Table.update() Delete Collection.remove() Table.delete() 17
  • 18. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | CRUD Operations NoSQL/Document Javascript Java C#NodeJS
  • 19. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | CRUD Operations SQL/Relational 19 Javascript Java C#NodeJS
  • 20. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | MySQL Document Store ✔ Built on Proven SQL/InnoDB/Replication ✔ Schema-less/Relational/Hybrid ✔ ACID/Transactions ✔ CRUD/JSON/Documents ✔ Modern Dev API ✔ Modern/Efficient Protocol ✔ SQL Queries/Analytics over JSON Documents ✔ Transparent and Easy HA/Scaling/Sharding
  • 21. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | New! Documentation • Developer Guides • Lots of examples New Style - Developer Focused 21 http://dev.mysql.com/doc/dev/mysqlsh-api-javascript/
  • 22. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Program Agenda MySQL Document Store MySQL Future 1 2 22
  • 23. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Vision
  • 24. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | “Be the most popular open source database for scale-out” 24
  • 25. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 3 MySQL will focus on three things. 25
  • 26. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 26 Scale-Out Ease-of-Use Out-of-Box Solution MySQL
  • 27. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 27 Ease-of-Use • Download, Install, HA & Scale-Out in 15 minutes • Single Interface for Everything MySQL • Easy to Setup, Scale-Out, Manage & Monitor • Excellent Quality MySQL
  • 28. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 28 Out-of-Box Solution • Integrated Solution vs. Individual Components • Designed & Developed Together • Tested & Delivered Together • Managed & Monitored Together MySQL
  • 29. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 29 Scale-Out • Maintain World-Class Performance • Rock Solid, Server-Side HA With Auto-Failover • Read Scale-Out With Replication • Write Scale-Out With Sharding MySQL
  • 30. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 4 Rollout will happen in four steps. 30
  • 31. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 31 Read Scale-Out Async Replication+ Auto Failover Write Scale-Out Sharding S1 S2 S3 S4 MySQL Vision – 4 Steps Timeline MySQLDocumentStore Relational & Document Model MySQLHA Out-Of-BoxHA
  • 32. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Introducing … 32
  • 33. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 33 Scale-Out High Performance Ease-of-Use Built-inHA Out-of-Box Solution Everything Integrated MySQL InnoDB cluster
  • 34. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 34 A single product: MySQL • All componentscreated together • Tested together • Packaged together Flexible and Modern • C++ 11 • ProtocolBuffers • Developer friendly MySQL InnoDB Cluster – Goals Easy to use • A single client: MySQL Shell • Easy packaging • Homogenousservers Scale-out • Sharded clusters • Federated system of N replica sets • Each replica set manages a shard
  • 35. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | MySQL InnoDB cluster MySQL InnoDB Cluster – Architecture - S2 M M M MySQLConnector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA Group Replication
  • 36. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | S1 S2 S3 S4 S… M M M MySQLConnector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA MySQL InnoDB Cluster – Architecture - S3 MySQL InnoDB cluster Read-Only Slaves
  • 37. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | S1 S2 S3 S4 S… M M M MySQLConnector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA ReplicaSet(Shard1) S1 S2 S3 S4 S… M M M MySQLConnector Application MySQL Router HA ReplicaSet(Shard2) S1 S2 S3 M M M H ReplicaSet(Shard3) MySQLConnector Application MySQL Router MySQL InnoDB Cluster – Architecture - S4 MySQL InnoDB cluster …
  • 38. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | MySQLConnector Application MySQL Connector Application MySQL Shell MySQLConnector Application MySQLConnector Application MySQL InnoDB Cluster – Architecture MySQL InnoDB cluster MySQL Enterprise Monitor …
  • 39. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | MySQL InnoDB cluster
  • 40. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Demo MySQL InnoDB cluster
  • 41. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | MySQL InnoDB cluster MySQL InnoDB Cluster – DEMO M M M Application MySQL Router MySQL Connector Applicaion MySQL Shell HA Group Replication 3310 3320 3330
  • 42. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 42 The Demo Showed… • MySQL HA in 4 minutes • Very easy, even for somebody new to MySQL • Everything managed through MySQL Shell • Convenient, easy-to-use AdminAPI MySQL InnoDB cluster
  • 43. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 1 One seamless solution for HA: Easy-to-Use, Out-of-Box, Scale- Out. 43 MySQL InnoDB cluster
  • 44. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | What’s next? 44
  • 45. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | 45 Read Scale-Out Async Replication+ Auto Failover Write Scale-Out Sharding S1 S2 S3 S4 MySQL Vision – 4 Steps Timeline Download Preview Release from labs.mysql.com MySQLDocumentStore Relational & Document Model MySQLHA Out-Of-BoxHA
  • 46. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Resources Topic Link(s) MySQLas a Document Database http://dev.mysql.com/doc/refman/5.7/en/document-database.html MySQLShell http://dev.mysql.com/doc/refman/5.7/en/mysql-shell.html http://dev.mysql.com/doc/refman/5.7/en/mysqlx-shell-tutorial-javascript.html http://dev.mysql.com/doc/refman/5.7/en/mysqlx-shell-tutorial-python.html X Dev API http://dev.mysql.com/doc/x-devapi-userguide/en/ X Plugin http://dev.mysql.com/doc/refman/5.7/en/x-plugin.html MySQLJSON http://mysqlserverteam.com/tag/json/ https://dev.mysql.com/doc/refman/5.7/en/json.html https://dev.mysql.com/doc/refman/5.7/en/json-functions.html 46
  • 47. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Thank you!