MySQL Cloud Service e Roadmap
-
Upload
mysql-brasil -
Category
Technology
-
view
268 -
download
0
Transcript of MySQL Cloud Service e Roadmap
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle MySQL Cloud Service
Airton Lastori [email protected] Nov-2016
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL presente na transformação digital Viabilizando Inovação com Agilidade
2
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 3
http://db-engines.com/en/ranking_trend (mar-2016)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 4
Desenvolvida e mantida por quem entende do mundo Enterprise
Foco em segurança e menor lock-in
Fácil de começar a usar. Teste gratuitamente em cloud.oracle.com
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 5
MySQL Enterprise Edition
Escalabilidade Autenticação
Firewall Auditoria novo TDE
Criptografia
MySQL Enterprise Monitor Oracle EM for MySQL
Plug-ins
Suporte
Hot Backup
Monitor & Workbench
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 6
+
MySQL Enterprise Edition
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• Simples & Automatizado
• Integrado
• Oracle Premier Support
• Enterprise Backup, Monitor, Security
7
Novo! MySQL Cloud Service
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Demonstração
https://attendee.gotowebinar.com/register/8789939433539117828
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 10 cloud.oracle.com/mysql
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Visão
11
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 12
Scale-Out
Ease-of-Use
Out-of-Box Solution
MySQL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13
Read Scale-Out
Async Replication + Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – 4 Steps
Timeline
MySQL Document Store
Relational & Document Model
MySQL HA
Out-Of-Box HA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 14
Read Scale-Out
Async Replication + Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – S1
Timeline
MySQL Document Store
Relational & Document Model
MySQL HA
Out-Of-Box HA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 15
http://db-engines.com/en/ranking_categories
183 NoSQL
12 categorias
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Usa MySQL como NoSQL
eng.uber.com/schemaless-part-one
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Usa MySQL como NoSQL
eng.uber.com/schemaless-part-one
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 18
Exemplo CRUD Document API MySQL 5.7.12+
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 19
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 20
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 21
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 22
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 24
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 26
Banco de Dados Híbrido: Confiabilidade + Flexibilidade
MySQL 5.7
JSON Support
MySQL Document
Store
RDBMS Proven, transactional, secure Complex JOINs and queries Extensive operational tools
NoSQL Solutions Flexible. Easy-to-use.
Schema-less document storage
Modern Applications Agile DevOps with robust data protection & security
Hybrid Database No trade-offs, best of both worlds. ACID properties & reliability of RDMS + flexible document management
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Exemplo Modelo híbrido: Schema + Schemaless
27
mysql> CREATE DATABASE product_hybrid_test; mysql> USE product_hybrid_test;
mysql> CREATE TABLE product_info_hybrid (
product_id INT NOT NULL PRIMARY KEY,
description VARCHAR(60) NOT NULL,
price FLOAT NOT NULL,
attributes JSON NOT NULL
);
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 28
Exemplo CRUD modelo híbrido MySQL 5.7.12+
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
CREATE 1
mysql> INSERT INTO product_info_hybrid VALUES (
9,
't-shirt',
20.0,
'{
"size" : "M",
"color" : "red",
"fabric" : "cotton"
}');
Query OK, 1 row affected (0.01 sec)
29
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
CREATE 2
mysql> INSERT INTO product_info_hybrid VALUES (
10,
'socks',
15.0,
'{
"size" : "40"
}');
Query OK, 1 row affected (0.01 sec)
30
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
READ mysql> SELECT * FROM product_info_hybrid;
+------------+-------------+-------+---------------------------------------------------+
| product_id | description | price | attributes |
+------------+-------------+-------+---------------------------------------------------+
| 9 | t-shirt | 20 | {"size": "M", "color": "red", "fabric": "cotton"} |
| 10 | socks | 15 | {"size": "40"} |
+------------+-------------+-------+---------------------------------------------------+
2 rows in set (0.00 sec)
31
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
READ com filtro mysql> SELECT * FROM product_info_hybrid WHERE attributes->"$.size"="40";
+------------+-------------+-------+----------------+
| product_id | description | price | attributes |
+------------+-------------+-------+----------------+
| 10 | socks | 15 | {"size": "40"} |
+------------+-------------+-------+----------------+
1 row in set (0.00 sec)
32
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
UPDATE mysql> UPDATE product_info_hybrid SET attributes = '{"size": "42"}' WHERE
product_id=10;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> SELECT * FROM product_info_hybrid;
+------------+-------------+-------+---------------------------------------------------+
| product_id | description | price | attributes |
+------------+-------------+-------+---------------------------------------------------+
| 9 | t-shirt | 20 | {"size": "M", "color": "red", "fabric": "cotton"} |
| 10 | socks | 15 | {"size": "42"} |
+------------+-------------+-------+---------------------------------------------------+
2 rows in set (0.00 sec)
33
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
DELETE mysql> DELETE FROM product_info_hybrid WHERE attributes->"$.size"="42";
Query OK, 1 row affected (0.01 sec)
mysql> SELECT * FROM product_info_hybrid;
+------------+-------------+-------+---------------------------------------------------+
| product_id | description | price | attributes |
+------------+-------------+-------+---------------------------------------------------+
| 9 | t-shirt | 20 | {"size": "M", "color": "red", "fabric": "cotton"} |
+------------+-------------+-------+---------------------------------------------------+
1 row in set (0.00 sec)
34
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Coluna
• Mais integridade no schema, independente da aplicação
• Schema torna a aplicação mais fácil de manter no longo prazo, pois há maior controle nas mudanças
– Espera-se uma maior qualidade dos dados
– Permite aplicação de algumas validações automáticas sobre os dados
JSON
• Mais liberdade para representar dados (ex. Campos custom)
• Denormalização natural, registro auto-contido (ex. facilita escalabilidade horizontal via sharding)
• Protótipos rápidos, comece armazenar dados imediatamente
• Menor preocupação na definição de Tipos de Dados
• Menos dor-de-cabeça para aplicar mudanças no modelo de dados
Oracle Confidential – Internal/Restricted/Highly Restricted 35
Coluna ou JSON? Você escolhe!
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 36
Read Scale-Out
Async Replication + Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – S1
Timeline
MySQL Document Store
Relational & Document Model
MySQL HA
Out-Of-Box HA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 37
Read Scale-Out
Async Replication + Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – S2
Timeline
MySQL Document Store
Relational & Document Model
MySQL HA
Out-Of-Box HA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL Connector
Application MySQL Connector
Application
MySQL Shell
MySQL Connector
Application
MySQL Connector
Application
MySQL InnoDB Cluster – Architecture – S2
MySQL InnoDB
cluster MySQL Enterprise Monitor
…
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
MySQL
InnoDB cluster
MySQL InnoDB Cluster – Architecture – S2
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
Group Replication
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Demonstração
MySQL InnoDB
cluster
youtube.com/embed/JWy7ZLXxtZ4
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 41
Read Scale-Out
Async Replication + Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – S3
Timeline
MySQL Document Store
Relational & Document Model
MySQL HA
Out-Of-Box HA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
MySQL InnoDB Cluster – Architecture - S3 MySQL
InnoDB cluster
Read-Only Slaves
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 43
Read Scale-Out
Async Replication + Auto Failover
Write Scale-Out
Sharding
S1
S2
S3
S4
MySQL Vision – 4 Steps
Timeline
MySQL Document Store
Relational & Document Model
MySQL HA
Out-Of-Box HA
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
Rep
licaS
et (
Shar
d 1
)
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
HA
Rep
licaS
et (
Shar
d 2
)
S1 S2 S3 S4
M
M M
HA
Rep
licaS
et (
Shar
d 3
)
MySQL Connector
Application
MySQL Router
MySQL InnoDB Cluster – Architecture - S4 MySQL
InnoDB cluster
…