SlideShare a Scribd company logo
1 of 82
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 121
Airton Lastori
airton.lastori@oracle.com
07-jun-2013
MySQL para Desenvolvedores de Games
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 122
@MySQLBR
meetup.com/MySQL-BR
facebook.com/MySQLBR
MySQLBR
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 123
Alguns clientes MySQL
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 124
Alguns clientes MySQL
fonte: alexa.com/topsites 30-jan-2013
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 125
Alguns clientes MySQL
mysql.com/customers
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 126
Alguns clientes MySQL
mysql.com/customers
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 127
MySQL: casos de sucesso
+ de 20 indústrias
mysql.com/customers
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 128
Indústria: Games
mysql.com/customers/industry/?id=83
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 129
Seu game precisa de um SGBD?
Qual o tipo de distribuição do game?
Download, Streaming, Online, Mobile...
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1210
Quase todos tipos de games modernos
necessitam de um sistema robusto de
armazenamento de dados
Dependendo da distribuição, o banco de dados pode ser
embarcado, centralizado ou distribuído.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1211
Game sem UI
MySQLgame
mysqlgame.com
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1212
Como escolher um SGBD?
Desafio de desenvolvedor #1
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1213
…pense nos requisitos não funcionais…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1214
Na escolha da solução, considerar...
Escalabilidade, performance, disponibilidade,
estabilidade, segurança, simplicidade, flexibilidade,
custo total de propriedade, conhecimento da equipe...
Ah! Não esqueça da fase de produção, dos DBAs...
ferramentas, suporte, rotinas de manutenção.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1215
Como o MySQL atende
Alguns destes requisitos?
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1216
MySQL para desenvolvedores
Portfolio
Ambiente de
desenvolvimento
Escalabilidade e
Alta-disponibilidade
Conhecendo melhor o
universo MySQL para
fazer boas escolhas…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1217
MySQL para desenvolvedores
Portfolio
Ambiente de
desenvolvimento
Escalabilidade e
Alta-disponibilidade
Conhecendo melhor o
universo MySQL para
fazer boas escolhas…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1218
 MySQL Database Community Server
 MySQL Cluster
 MySQL Workbench
 MySQL Connectors
 MySQL Proxy
 Documentação não GPL
 Forums, Lists, Bugs, Blogs…
Compromisso Oracle com MySQL Community
Portfólio disponível para download e uso sob GPL
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1219
Conectores: amplo suporte a várias linguagens
Oracle
• Connector/ODBC
• Connector/Net (ADO.NET)
• Connector/Python
• Connector/J (JDBC)
• Connector/C (C API)
• Connector/C++ (C++ API)
Comunidade
• PHP
• Perl
• Ruby
• TCL
• Eiffel
• …
dev.mysql.com/doc/refman/5.5/en/connectors-apis.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1220
Oracle Premier
Lifetime Support
Oracle Product
Certifications/Integrations
MySQL Enterprise
High Availability
MySQL Enterprise
Security
MySQL Enterprise
Scalability
MySQL Enterprise
Backup
MySQL Enterprise
Monitor/Query Analyzer
MySQL Workbench
MySQL Enterprise Edition
Maior produtividade e mitigação de riscos
MySQL Enterprise
Audit
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1221
MySQL para desenvolvedores
Portfolio
Ambiente de
desenvolvimento
Escalabilidade e
Alta-disponibilidade
Conhecendo melhor o
universo MySQL para
fazer boas escolhas…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1222
Desafio de desenvolvedor #2
Instalação básica, ambiente de
desenvolvimento…
...em 15 minutos, ou menos!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1223
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1224
mysql.com/downloads/mysql
No Linux ou Mac, prefira os binários
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1225
Client
mysql / mysql.exe
Server
mysqld / mysqld.exe
Cliente-Servidor
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1226
Iniciar ou Parar o servidor MySQL no Windows
…ou via MySQL Notifier
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1227
Iniciar ou Parar o servidor MySQL no Linux
/usr/local/mysql/bin> mysqld_safe --defaults-file=/etc/my.cnf &
/usr/local/mysql/bin> mysqladmin shutdown
Parar:
Iniciar:
dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1228
Primeira conexão
C:Program FilesMySQLMySQL Server 5.5bin>mysql -uroot -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 8
Server version: 5.5.28 MySQL Community Server (GPL)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1229
Teste via MySQL Workbench 1/2
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1230
Teste via MySQL Workbench 2/2
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1231
App + Connector
JDBC, ODBC, .Net, PHP, Python, Perl, Ruby, Native C API…
Server
mysqld / mysqld.exe
Cliente-Servidor
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1232
Desafio de desenvolvedor #3
Hello World…
...em Java
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1233
Adicione o driver MySQL ao CLASSPATH
caminho completo do .jar
C:>set CLASSPATH
CLASSPATH=.;C:Program Files (x86)Javajre6libextQTJava.zip;C:Program
FilesMySQLmysql-connector-java-5.1.22mysql-connector-java-5.1.22-bin.jar
Confira:
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1234
HelloMysql.java 1/2
import java.sql.*;
public class HelloMysql {
public static void main(String args[]){
System.out.println("Tentando conectar ao MySQL...");
try {
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/mysql";
String usuario = "root";
String senha = "root";
Connection con = DriverManager.getConnection(url, usuario, senha);
System.out.println("URL: " + url);
System.out.println("Connection: " + con);
Continua…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1235
HelloMysql.java 2/2
Statement stmt = con.createStatement(); //objeto Statement
ResultSet rs; //objeto ResultSet
rs = stmt.executeQuery("SELECT * FROM world.country");
System.out.println("Ola mundo!");
while(rs.next()){
String nomePais = rs.getString("Name");
System.out.print(nomePais + ", ");
}//end while
con.close();
} catch( Exception e ) {
e.printStackTrace();
}//end catch
}//end main
}//end class HelloMysql
PRONTO!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1236
java HelloMysql
C:tutorial>javac HelloMysql.java
C:tutorial>java HelloMysql
Tentando conectar ao MySQL...
URL: jdbc:mysql://localhost:3306/mysql
Connection: com.mysql.jdbc.JDBC4Connection@ed07f45
Ola mundo!
Aruba, Afghanistan, Angola, Anguilla, Albania, Andorra, Netherlands Antilles, Un
ited Arab Emirates, Argentina, Armenia, American Samoa, Antarctica, French South
ern territories, Antigua and Barbuda, Australia, Austria, Azerbaijan, Burundi, B
elgium, Benin, Burkina Faso, Bangladesh, Bulgaria, Bahrain, Bahamas, Bosnia and
Herzegovina, Belarus, Belize, Bermuda, Bolivia, Brazil, Barbados, Brunei, Bhutan
…
ietnam, Vanuatu, Wallis and Futuna, Samoa, Yemen, Yugoslavia, South Africa, Zamb
ia, Zimbabwe,
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1237
Próximo passo: documentação
Reference Manual
1. Tutorial
2. SQL Syntax
3. Connectors & APIs, Memcached
4. Functions, Views, Stored Programs
5. Optimization
dev.mysql.com/doc/refman/5.5/en/index.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1238
MySQL para desenvolvedores
Portfolio
Ambiente de
desenvolvimento
Escalabilidade e
Alta-disponibilidade
Conhecendo melhor o
universo MySQL para
fazer boas escolhas…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1239
Desafio do desenvolvedor #4
Projetar uma solução para
disponibilidade 24x7…
...a famosa alta-disponibilidade
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1240
Alta-Disponibilidade
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1241
Aplicação
Master Slave
• Modelo unidirecional assíncrono (padrão)
• Modelo semi-síncrono (a partir da versão 5.5)
Escritas & Leituras
Replicação MySQL
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1242
Aplicação
Master Slave
• Master down
• Slave promovido para Master
Escritas & Leituras
MySQL failover
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1243
Alta-Disponibilidade
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1244
Soluções certificadas MySQL HA: resumo
mysql.com/why-mysql/white-papers/mysql_wp_ha_strategy_guide.php
MySQL 5.6
Replication
Windows
Cluster
Solaris
Cluster
Oracle VM
Template
DRBD
MySQL
Cluster
Nível de disponibilidade 99.9% 99.95% 99.99% 99.99% 99.99% 99.999%
Auto-Failover ✔ ✔ ✔ ✔ ✔ ✔
Sem perda de dados durante
failover
✔
Semi-Sync
✔ ✔ ✔ ✔ ✔
Plataformas suportadas All Windows Solaris Linux Linux All
Modo de clusterização
Master +
Slaves
Active /
Passive
Active /
Passive
Active /
Passive
Active /
Passive
Multi-
Master
Dispensa Shared Storage ✔ ✖ ✖ ✖ ✔ ✔
Ponto único de suporte ✔ ✖ ✔ ✔ ✔ ✔
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1245
Desafio do desenvolvedor #5
Projetar uma solução que possa
crescer para comportar milhões
de usuários…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1246
Scale Out
• Adicionar mais servidores para
aumentar performance
• MySQL adota esta abordagem
em sistemas altamente
escaláveis em hardware
commodity (Intel / AMD)
Scale Up
• Trocar por hardware mais
poderoso, adicionar memória,
CPU
• Outras soluções normalmente
usam hardware proprietário
(SMP)
Escalabilidade: horizontal vs vertical
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1250
Escalabilidade horizontal
Replicação MySQL
• método mais simples e
mais comum
• indicado para aplicações
de LEITURA intensiva
• problemas com cache
duplicado em aplicações
com datasets grandes
Particionamento
Funcional
• dividir a carga em múltiplos
nós, com responsabilidades
distintas
• os nós podem ter
redundância via replicação
para alta-disponibilidade
• normalmente não é
transparente para a aplicação
e também recorre ao scale up
para cada database funcional,
o que impõe limites
Data Sharding
• método de maior sucesso
para escalar aplicações
MySQL de grande porte
hoje
• dados compartilhados em
tabelas/caches globais,
SOA
• difícil de adaptar
aplicações legadas
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1251
Replicação MySQL: escalando LEITURAS
• Divisão de leituras e escritas (R/W Split)
• É possível adicionar mais slaves, dividir a carga
Leituras
Aplicação
Master Slave
Escritas & Leituras Leituras
Slave
…
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1252
Data Node 1
Data Node 2
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1253
Data Node 1
Data Node 2
F1
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1254
Data Node 1
Data Node 2
F1
F3
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1255
Data Node 1
Data Node 2
F1
F3
Data Node 3
Data Node 4
F2
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1256
Data Node 1
Data Node 2
F1
F3
Data Node 3
Data Node 4
F2
F4
Table T1
P2
P3
P4
P1
Data Sharding: escalando ESCRITAS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1257
Desafios do desenvolvedor #4 + #5
É possível combinar alta-
disponibilidade e escalabilidade?
...assim como Facebook, Twitter, Youtube
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1258
Data Node 1
Data Node 2
F1
F1
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
Data Sharding + Replicação
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1259
Data Node 1
Data Node 2
F1 F3
F1
Data Node 3
Data Node 4
Table T1
P2
P3
P4
P1
F3
Data Sharding + Replicação
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1260
Data Node 1
Data Node 2
F1 F3
F3 F1
Data Node 3
Data Node 4
F2
F2
Table T1
P2
P3
P4
P1
Alta-Disponibilidade: Replicação Síncrona
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1261
Data Node 1
Data Node 2
F1 F3
F3 F1
Data Node 3
Data Node 4
F2 F4
F4 F2
Table T1
P2
P3
P4
P1
Data Sharding + Replicação
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1262
Data Node 1
Data Node 2
F1 F3
F3 F1
Data Node 3
Data Node 4
F2 F4
F4 F2
Group1
Table T1
P2
P3
P4
P1
Data Sharding + Replicação
Group2
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1263
Data Node 1
Data Node 2
F1 F3
F3 F1
Data Node 3
Data Node 4
F2 F4
F4 F2
Group1
Table T1
P2
P3
P4
P1
Data Sharding + Replicação
Group2
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1265
Desafios do desenvolvedor #4 + #5
É possível ter alta-disponibilidade
e escalabilidade com menor
esforço de implementação?
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1266
MySQL Cluster
• Arquitetura shared-nothing in-memory parallel
• Modelo relacional ACID, SQL
Carrier Grade
Database
• 99.999% de disponibilidade
• Self-healing, failover abaixo de 1 segundo
Alta Disponibilidade
• Performance em tempo real para altas cargas
• Latência baixa e preditiva
Alta Performance
• Elasticidade, crescimento incremental
• Escalabilidade linear, distribuition aware
Escalabilidade
• Open Source, hardware commodity
• APIs NoSQL (C++, Java, Memcached, Node.js)
Open Source
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1267
Alguns Clientes MySQL Cluster
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1268
Alguns Clientes MySQL Cluster
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1269
MySQL Cluster Data Nodes
Data Layer
Clients
Application Layer
Management
mgm_ndbd
MySQL Cluster: auto-sharding
Table T1
P2
P3
P4
P1F1
F3
F3
F1
F2
F4
F4
F2
Management
mgm_ndbd
mysqldmysqld
ndbd ndbd ndbd ndbd
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1270
MySQL Cluster Data Nodes
Data Layer
Clients
Application Layer
Management
mgm_ndbd
MySQL Cluster: alta-disponibilidade
Table T1
F1
F3
F3
F1
F2
F4
F4
F2
Management
mgm_ndbd
mysqldmysqld
ndbd ndbd ndbd ndbd
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1271
MySQL Cluster Data Nodes
Data Layer
Clients
Application Layer
Management
MySQL Cluster: auto-sharding
Table T1
P2
P3
P4
P1F1
F3
F3
F1
F2
F4
F4
F2
Management
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1272
•2 milhões usuários, com 30.000 novos
usuários por dia
•10.000 usuários concorrentes
•10.000 Transações Por Segundo
•99.999% uptime
“The MySQL support service has
been essential in helping us for
troubleshooting and giving
recommendations for the production
cluster.”
Carlos Morales (DBA), Playfulplay.com
blogs.oracle.com/MySQL/entry/mysql_cluster_powers_el_chavo
Caso de sucesso
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1273
Bônus para o desenvolvedor
Escreva via NoSQL (schemaless)
e consulte via SQL
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1274
Os mesmos dados
acessados
simultaneamente
através de interfaces
SQL e NoSQL
APIs de Acesso aos Dados
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1275
<estado:SP,Campinas>
prefix key value
<estado:SP,Campinas>
key value
Prefix Table Key-col Val-col policy
estado: mapa.cidades sigla_estado cidade cluster
Config tables
sigla_estado ... cidade ...
SP ... Campinas ...
Tabela cidades do DB mapa
visão da Aplicação
visão MySQL Cluster
Cluster & Memcached
Schema configurável
SELECT * FROM mapa.cidades
WHERE cidade LIKE ’C%’;
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1276
Exemplos Memcached API
On-demand Webinar:
NoSQL Memcached API for MySQL Cluster
22 August 2012
mysql.com/news-and-events/on-demand-webinars/display-od-723.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1277
Exemplos JavaScript / Node.js API
Blog:
Tutorial Getting Started with the NoSQL JavaScript / Node.js API for
MySQL Cluster
10 June 2012
blogs.oracle.com/MySQL/entry/tutorial_getting_started_with_the
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1278
MySQL Cluster Auto-Install (beta)
 Simples de instalar e provisionar clusters multi-node
 Complementa MySQL Cluster Manager no gerenciamento de cliclo de vida
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1279
1. Download MCM/Cluster edelivery.oracle.com:
2. Unzip e execute o comando com usuário diferente de root:
MySQL Cluster Manager
Para testes em uma única máquina
C:MySQLmcmbin> mcmd --bootstrap
MySQL Cluster Manager 1.1.2 started
Connect to MySQL Cluster Manager by running “C:MySQLmcmbinmcm" -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 “C:MySQLmcmclusterbinmysql" -h NOVA -P 3306 -u root
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1280
Mais sobre como começar com MySQL Cluster
Whitepaper:
MySQL Cluster Evaluation Guide
February 2012
mysql.com/why-mysql/white-papers/mysql-
cluster-evaluation-guide/
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1281
Sumário
 O MySQL é o banco de dados open source mais popular do
mundo, usado em grandes sites, games, aplicações mobile e
embarcadas.
 Há várias opções de arquiteturas e APIs, oferecendo enorme
flexibilidade, escalabilidade e alta-disponibilidade.
 Instale e comece a usar em menos de 15min. Use e abuse da
documentação!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1282
@MySQLBR
meetup.com/MySQL-BR
facebook.com/MySQLBR
Obrigado!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1283
Perguntas?
MySQL para Desenvolvedores
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1284
MySQL Boot Camp
Accelerated
MySQL Performance
Tuning Boot Camp
Accelerated
MySQL for Begginers
MySQL for Database
Administrators
MySQL Performance
Tuning
MySQL High Availability
MySQL Cluster
MySQL DBA
MySQL Boot Camp
Accelerated
MySQL for Developers
MySQL Performance
Tuning Boot Camp
Accelerated
MySQL for Begginers
MySQL and PHP
Developing Dynamic
Web Applicationg
MySQL Advanced Stored
Procedures
MySQLDeveloper
mysql.com/training
Certificações
Opcional
Necessário
Treinamentos e certificações
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1285
Clients & Connectors
Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl
Connection Pool, SQL Interface, Parser, Optimizer, Caches
Enterprise Management
Services and Utilities
Backup & Recovery
Monitor
Workbench
Utilities
mysqld
Clients and Apps
Arquitetura MySQL Server
Storage Engines
InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc…
Filesystems, Files and Logs
Data, Index, Redo, Undo, Binary, Error, Slow
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1286
Storage Engines
MyISAM InnoDB NDB Cluster
Transações ✖ ✔ ✔
Nível de Lock Tabela Linha Linha
Replicação
Assíncrona ou
Semi-síncrona
Assíncrona ou
Semi-síncrona
Síncrona, Multi-master
Foreign Keys ✖ ✔ a partir da v7.3
Full-text indexes ✔ a partir da v5.6 ✖
Compressão de dados somente Leitura ✔ ✖
Caches somente Índices Dados e Índices Dados e Índices
Suporte Geospacial Tipos de Dados e Índices somente Tipos de Dados somente Tipos de Dados
Limite de armazenamento 256TB 64TB 384EB
dev.mysql.com/doc/refman/5.5/en/storage-engines.html

More Related Content

What's hot

Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Dave Stokes
 

What's hot (20)

As novidades do Java EE 7: do HTML5 ao JMS 2.0
As novidades do Java EE 7: do HTML5 ao JMS 2.0As novidades do Java EE 7: do HTML5 ao JMS 2.0
As novidades do Java EE 7: do HTML5 ao JMS 2.0
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
 
Coherence 12.1.2 Hidden Gems
Coherence 12.1.2 Hidden GemsCoherence 12.1.2 Hidden Gems
Coherence 12.1.2 Hidden Gems
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
 
Python and MySQL 8.0 Document Store
Python and MySQL 8.0 Document StorePython and MySQL 8.0 Document Store
Python and MySQL 8.0 Document Store
 
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
 
Tx lf propercareandfeedmysql
Tx lf propercareandfeedmysqlTx lf propercareandfeedmysql
Tx lf propercareandfeedmysql
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
 
WebSockets: um upgrade de comunicação no HTML5
WebSockets: um upgrade de comunicação no HTML5WebSockets: um upgrade de comunicação no HTML5
WebSockets: um upgrade de comunicação no HTML5
 
Java EE 7 - PulsoConf 2013
Java EE 7 - PulsoConf 2013 Java EE 7 - PulsoConf 2013
Java EE 7 - PulsoConf 2013
 
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamMySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
 
Welcome to MySQL
Welcome to MySQLWelcome to MySQL
Welcome to MySQL
 
'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin
 
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
 
Moodle Moot Spain: Moodle Available and Scalable with MySQL HA - InnoDB Clust...
Moodle Moot Spain: Moodle Available and Scalable with MySQL HA - InnoDB Clust...Moodle Moot Spain: Moodle Available and Scalable with MySQL HA - InnoDB Clust...
Moodle Moot Spain: Moodle Available and Scalable with MySQL HA - InnoDB Clust...
 
【旧版】Oracle Autonomous Database:サービス概要のご紹介 [2020年8月版]
【旧版】Oracle Autonomous Database:サービス概要のご紹介 [2020年8月版]【旧版】Oracle Autonomous Database:サービス概要のご紹介 [2020年8月版]
【旧版】Oracle Autonomous Database:サービス概要のご紹介 [2020年8月版]
 
MySQL 5.6 Updates
MySQL 5.6 UpdatesMySQL 5.6 Updates
MySQL 5.6 Updates
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
 
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit' 'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
 

Similar to MySQL para Desenvolvedores de Games

From Nice to Have to Mission Critical: MySQL Enterprise Edition
From Nice to Have to Mission Critical: MySQL Enterprise EditionFrom Nice to Have to Mission Critical: MySQL Enterprise Edition
From Nice to Have to Mission Critical: MySQL Enterprise Edition
郁萍 王
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Sven Sandberg
 
MySQL Administration and Monitoring
MySQL Administration and MonitoringMySQL Administration and Monitoring
MySQL Administration and Monitoring
Mark Leith
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
Vijay Nair
 
A Importância do JavaFX no Mercado Embedded
A Importância do JavaFX no Mercado EmbeddedA Importância do JavaFX no Mercado Embedded
A Importância do JavaFX no Mercado Embedded
Bruno Borges
 
Introduction to JavaFX on Raspberry Pi
Introduction to JavaFX on Raspberry PiIntroduction to JavaFX on Raspberry Pi
Introduction to JavaFX on Raspberry Pi
Bruno Borges
 
IOUG Collaborate 2014 DBaaS in a DBAs World
IOUG Collaborate 2014 DBaaS in a DBAs WorldIOUG Collaborate 2014 DBaaS in a DBAs World
IOUG Collaborate 2014 DBaaS in a DBAs World
Kellyn Pot'Vin-Gorman
 
Oak Table Collaborate Snapclone Talk
Oak Table Collaborate Snapclone TalkOak Table Collaborate Snapclone Talk
Oak Table Collaborate Snapclone Talk
Kellyn Pot'Vin-Gorman
 

Similar to MySQL para Desenvolvedores de Games (20)

NetBeans Day 2016 - Getting the best of NetBeans IDE
NetBeans Day 2016 - Getting the best of NetBeans IDENetBeans Day 2016 - Getting the best of NetBeans IDE
NetBeans Day 2016 - Getting the best of NetBeans IDE
 
From Nice to Have to Mission Critical: MySQL Enterprise Edition
From Nice to Have to Mission Critical: MySQL Enterprise EditionFrom Nice to Have to Mission Critical: MySQL Enterprise Edition
From Nice to Have to Mission Critical: MySQL Enterprise Edition
 
Architecture performance and tips and tricks for instantis enterprise track 8...
Architecture performance and tips and tricks for instantis enterprise track 8...Architecture performance and tips and tricks for instantis enterprise track 8...
Architecture performance and tips and tricks for instantis enterprise track 8...
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
 
MySQL Administration and Monitoring
MySQL Administration and MonitoringMySQL Administration and Monitoring
MySQL Administration and Monitoring
 
whats-new-netbeans-ide-80.pptx
whats-new-netbeans-ide-80.pptxwhats-new-netbeans-ide-80.pptx
whats-new-netbeans-ide-80.pptx
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
 
MySQL para Desenvolvedores de Games
MySQL para Desenvolvedores de GamesMySQL para Desenvolvedores de Games
MySQL para Desenvolvedores de Games
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsBasic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAs
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
 
2014 OpenSuse Conf: Protect your MySQL Server
2014 OpenSuse Conf: Protect your MySQL Server2014 OpenSuse Conf: Protect your MySQL Server
2014 OpenSuse Conf: Protect your MySQL Server
 
A Importância do JavaFX no Mercado Embedded
A Importância do JavaFX no Mercado EmbeddedA Importância do JavaFX no Mercado Embedded
A Importância do JavaFX no Mercado Embedded
 
Introduction to JavaFX on Raspberry Pi
Introduction to JavaFX on Raspberry PiIntroduction to JavaFX on Raspberry Pi
Introduction to JavaFX on Raspberry Pi
 
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!MySQL Innovation Day Chicago  - MySQL HA So Easy : That's insane !!
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
 
IOUG Collaborate 2014 DBaaS in a DBAs World
IOUG Collaborate 2014 DBaaS in a DBAs WorldIOUG Collaborate 2014 DBaaS in a DBAs World
IOUG Collaborate 2014 DBaaS in a DBAs World
 
Sightly_techInsight
Sightly_techInsightSightly_techInsight
Sightly_techInsight
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10
 
Developing Applications with MySQL and Java
Developing Applications with MySQL and JavaDeveloping Applications with MySQL and Java
Developing Applications with MySQL and Java
 
Oak Table Collaborate Snapclone Talk
Oak Table Collaborate Snapclone TalkOak Table Collaborate Snapclone Talk
Oak Table Collaborate Snapclone Talk
 

More from MySQL Brasil

More from MySQL Brasil (20)

MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e Uber
 
MySQL 8.0.1 DMR
MySQL 8.0.1 DMRMySQL 8.0.1 DMR
MySQL 8.0.1 DMR
 
Alta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL EnterpriseAlta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL Enterprise
 
MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17
 
Segurança no MySQL
Segurança no MySQLSegurança no MySQL
Segurança no MySQL
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL
 
Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document Store
 
Enabling digital transformation with MySQL
Enabling digital transformation with MySQLEnabling digital transformation with MySQL
Enabling digital transformation with MySQL
 
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHPAlta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
 
Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7
 
NoSQL no MySQL 5.7
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7
 
OpenStack & MySQL
OpenStack & MySQLOpenStack & MySQL
OpenStack & MySQL
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
 
Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15
 
Estratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQLEstratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQL
 
Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15
 
Serviços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e JavaServiços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e Java
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

MySQL para Desenvolvedores de Games

  • 1. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 121 Airton Lastori airton.lastori@oracle.com 07-jun-2013 MySQL para Desenvolvedores de Games
  • 2. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 122 @MySQLBR meetup.com/MySQL-BR facebook.com/MySQLBR MySQLBR
  • 3. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 123 Alguns clientes MySQL
  • 4. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 124 Alguns clientes MySQL fonte: alexa.com/topsites 30-jan-2013
  • 5. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 125 Alguns clientes MySQL mysql.com/customers
  • 6. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 126 Alguns clientes MySQL mysql.com/customers
  • 7. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 127 MySQL: casos de sucesso + de 20 indústrias mysql.com/customers
  • 8. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 128 Indústria: Games mysql.com/customers/industry/?id=83
  • 9. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 129 Seu game precisa de um SGBD? Qual o tipo de distribuição do game? Download, Streaming, Online, Mobile...
  • 10. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1210 Quase todos tipos de games modernos necessitam de um sistema robusto de armazenamento de dados Dependendo da distribuição, o banco de dados pode ser embarcado, centralizado ou distribuído.
  • 11. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1211 Game sem UI MySQLgame mysqlgame.com
  • 12. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1212 Como escolher um SGBD? Desafio de desenvolvedor #1
  • 13. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1213 …pense nos requisitos não funcionais…
  • 14. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1214 Na escolha da solução, considerar... Escalabilidade, performance, disponibilidade, estabilidade, segurança, simplicidade, flexibilidade, custo total de propriedade, conhecimento da equipe... Ah! Não esqueça da fase de produção, dos DBAs... ferramentas, suporte, rotinas de manutenção.
  • 15. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1215 Como o MySQL atende Alguns destes requisitos?
  • 16. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1216 MySQL para desenvolvedores Portfolio Ambiente de desenvolvimento Escalabilidade e Alta-disponibilidade Conhecendo melhor o universo MySQL para fazer boas escolhas…
  • 17. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1217 MySQL para desenvolvedores Portfolio Ambiente de desenvolvimento Escalabilidade e Alta-disponibilidade Conhecendo melhor o universo MySQL para fazer boas escolhas…
  • 18. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1218  MySQL Database Community Server  MySQL Cluster  MySQL Workbench  MySQL Connectors  MySQL Proxy  Documentação não GPL  Forums, Lists, Bugs, Blogs… Compromisso Oracle com MySQL Community Portfólio disponível para download e uso sob GPL
  • 19. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1219 Conectores: amplo suporte a várias linguagens Oracle • Connector/ODBC • Connector/Net (ADO.NET) • Connector/Python • Connector/J (JDBC) • Connector/C (C API) • Connector/C++ (C++ API) Comunidade • PHP • Perl • Ruby • TCL • Eiffel • … dev.mysql.com/doc/refman/5.5/en/connectors-apis.html
  • 20. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1220 Oracle Premier Lifetime Support Oracle Product Certifications/Integrations MySQL Enterprise High Availability MySQL Enterprise Security MySQL Enterprise Scalability MySQL Enterprise Backup MySQL Enterprise Monitor/Query Analyzer MySQL Workbench MySQL Enterprise Edition Maior produtividade e mitigação de riscos MySQL Enterprise Audit
  • 21. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1221 MySQL para desenvolvedores Portfolio Ambiente de desenvolvimento Escalabilidade e Alta-disponibilidade Conhecendo melhor o universo MySQL para fazer boas escolhas…
  • 22. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1222 Desafio de desenvolvedor #2 Instalação básica, ambiente de desenvolvimento… ...em 15 minutos, ou menos!
  • 23. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1223
  • 24. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1224 mysql.com/downloads/mysql No Linux ou Mac, prefira os binários
  • 25. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1225 Client mysql / mysql.exe Server mysqld / mysqld.exe Cliente-Servidor
  • 26. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1226 Iniciar ou Parar o servidor MySQL no Windows …ou via MySQL Notifier
  • 27. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1227 Iniciar ou Parar o servidor MySQL no Linux /usr/local/mysql/bin> mysqld_safe --defaults-file=/etc/my.cnf & /usr/local/mysql/bin> mysqladmin shutdown Parar: Iniciar: dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html
  • 28. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1228 Primeira conexão C:Program FilesMySQLMySQL Server 5.5bin>mysql -uroot -p Enter password: **** Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 8 Server version: 5.5.28 MySQL Community Server (GPL) Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql>
  • 29. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1229 Teste via MySQL Workbench 1/2
  • 30. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1230 Teste via MySQL Workbench 2/2
  • 31. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1231 App + Connector JDBC, ODBC, .Net, PHP, Python, Perl, Ruby, Native C API… Server mysqld / mysqld.exe Cliente-Servidor
  • 32. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1232 Desafio de desenvolvedor #3 Hello World… ...em Java
  • 33. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1233 Adicione o driver MySQL ao CLASSPATH caminho completo do .jar C:>set CLASSPATH CLASSPATH=.;C:Program Files (x86)Javajre6libextQTJava.zip;C:Program FilesMySQLmysql-connector-java-5.1.22mysql-connector-java-5.1.22-bin.jar Confira:
  • 34. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1234 HelloMysql.java 1/2 import java.sql.*; public class HelloMysql { public static void main(String args[]){ System.out.println("Tentando conectar ao MySQL..."); try { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/mysql"; String usuario = "root"; String senha = "root"; Connection con = DriverManager.getConnection(url, usuario, senha); System.out.println("URL: " + url); System.out.println("Connection: " + con); Continua…
  • 35. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1235 HelloMysql.java 2/2 Statement stmt = con.createStatement(); //objeto Statement ResultSet rs; //objeto ResultSet rs = stmt.executeQuery("SELECT * FROM world.country"); System.out.println("Ola mundo!"); while(rs.next()){ String nomePais = rs.getString("Name"); System.out.print(nomePais + ", "); }//end while con.close(); } catch( Exception e ) { e.printStackTrace(); }//end catch }//end main }//end class HelloMysql PRONTO!
  • 36. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1236 java HelloMysql C:tutorial>javac HelloMysql.java C:tutorial>java HelloMysql Tentando conectar ao MySQL... URL: jdbc:mysql://localhost:3306/mysql Connection: com.mysql.jdbc.JDBC4Connection@ed07f45 Ola mundo! Aruba, Afghanistan, Angola, Anguilla, Albania, Andorra, Netherlands Antilles, Un ited Arab Emirates, Argentina, Armenia, American Samoa, Antarctica, French South ern territories, Antigua and Barbuda, Australia, Austria, Azerbaijan, Burundi, B elgium, Benin, Burkina Faso, Bangladesh, Bulgaria, Bahrain, Bahamas, Bosnia and Herzegovina, Belarus, Belize, Bermuda, Bolivia, Brazil, Barbados, Brunei, Bhutan … ietnam, Vanuatu, Wallis and Futuna, Samoa, Yemen, Yugoslavia, South Africa, Zamb ia, Zimbabwe,
  • 37. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1237 Próximo passo: documentação Reference Manual 1. Tutorial 2. SQL Syntax 3. Connectors & APIs, Memcached 4. Functions, Views, Stored Programs 5. Optimization dev.mysql.com/doc/refman/5.5/en/index.html
  • 38. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1238 MySQL para desenvolvedores Portfolio Ambiente de desenvolvimento Escalabilidade e Alta-disponibilidade Conhecendo melhor o universo MySQL para fazer boas escolhas…
  • 39. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1239 Desafio do desenvolvedor #4 Projetar uma solução para disponibilidade 24x7… ...a famosa alta-disponibilidade
  • 40. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1240 Alta-Disponibilidade
  • 41. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1241 Aplicação Master Slave • Modelo unidirecional assíncrono (padrão) • Modelo semi-síncrono (a partir da versão 5.5) Escritas & Leituras Replicação MySQL
  • 42. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1242 Aplicação Master Slave • Master down • Slave promovido para Master Escritas & Leituras MySQL failover
  • 43. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1243 Alta-Disponibilidade
  • 44. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1244 Soluções certificadas MySQL HA: resumo mysql.com/why-mysql/white-papers/mysql_wp_ha_strategy_guide.php MySQL 5.6 Replication Windows Cluster Solaris Cluster Oracle VM Template DRBD MySQL Cluster Nível de disponibilidade 99.9% 99.95% 99.99% 99.99% 99.99% 99.999% Auto-Failover ✔ ✔ ✔ ✔ ✔ ✔ Sem perda de dados durante failover ✔ Semi-Sync ✔ ✔ ✔ ✔ ✔ Plataformas suportadas All Windows Solaris Linux Linux All Modo de clusterização Master + Slaves Active / Passive Active / Passive Active / Passive Active / Passive Multi- Master Dispensa Shared Storage ✔ ✖ ✖ ✖ ✔ ✔ Ponto único de suporte ✔ ✖ ✔ ✔ ✔ ✔
  • 45. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1245 Desafio do desenvolvedor #5 Projetar uma solução que possa crescer para comportar milhões de usuários…
  • 46. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1246 Scale Out • Adicionar mais servidores para aumentar performance • MySQL adota esta abordagem em sistemas altamente escaláveis em hardware commodity (Intel / AMD) Scale Up • Trocar por hardware mais poderoso, adicionar memória, CPU • Outras soluções normalmente usam hardware proprietário (SMP) Escalabilidade: horizontal vs vertical
  • 47. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1250 Escalabilidade horizontal Replicação MySQL • método mais simples e mais comum • indicado para aplicações de LEITURA intensiva • problemas com cache duplicado em aplicações com datasets grandes Particionamento Funcional • dividir a carga em múltiplos nós, com responsabilidades distintas • os nós podem ter redundância via replicação para alta-disponibilidade • normalmente não é transparente para a aplicação e também recorre ao scale up para cada database funcional, o que impõe limites Data Sharding • método de maior sucesso para escalar aplicações MySQL de grande porte hoje • dados compartilhados em tabelas/caches globais, SOA • difícil de adaptar aplicações legadas
  • 48. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1251 Replicação MySQL: escalando LEITURAS • Divisão de leituras e escritas (R/W Split) • É possível adicionar mais slaves, dividir a carga Leituras Aplicação Master Slave Escritas & Leituras Leituras Slave …
  • 49. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1252 Data Node 1 Data Node 2 Data Node 3 Data Node 4 Table T1 P2 P3 P4 P1 Data Sharding: escalando ESCRITAS
  • 50. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1253 Data Node 1 Data Node 2 F1 Data Node 3 Data Node 4 Table T1 P2 P3 P4 P1 Data Sharding: escalando ESCRITAS
  • 51. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1254 Data Node 1 Data Node 2 F1 F3 Data Node 3 Data Node 4 Table T1 P2 P3 P4 P1 Data Sharding: escalando ESCRITAS
  • 52. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1255 Data Node 1 Data Node 2 F1 F3 Data Node 3 Data Node 4 F2 Table T1 P2 P3 P4 P1 Data Sharding: escalando ESCRITAS
  • 53. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1256 Data Node 1 Data Node 2 F1 F3 Data Node 3 Data Node 4 F2 F4 Table T1 P2 P3 P4 P1 Data Sharding: escalando ESCRITAS
  • 54. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1257 Desafios do desenvolvedor #4 + #5 É possível combinar alta- disponibilidade e escalabilidade? ...assim como Facebook, Twitter, Youtube
  • 55. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1258 Data Node 1 Data Node 2 F1 F1 Data Node 3 Data Node 4 Table T1 P2 P3 P4 P1 Data Sharding + Replicação
  • 56. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1259 Data Node 1 Data Node 2 F1 F3 F1 Data Node 3 Data Node 4 Table T1 P2 P3 P4 P1 F3 Data Sharding + Replicação
  • 57. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1260 Data Node 1 Data Node 2 F1 F3 F3 F1 Data Node 3 Data Node 4 F2 F2 Table T1 P2 P3 P4 P1 Alta-Disponibilidade: Replicação Síncrona
  • 58. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1261 Data Node 1 Data Node 2 F1 F3 F3 F1 Data Node 3 Data Node 4 F2 F4 F4 F2 Table T1 P2 P3 P4 P1 Data Sharding + Replicação
  • 59. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1262 Data Node 1 Data Node 2 F1 F3 F3 F1 Data Node 3 Data Node 4 F2 F4 F4 F2 Group1 Table T1 P2 P3 P4 P1 Data Sharding + Replicação Group2
  • 60. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1263 Data Node 1 Data Node 2 F1 F3 F3 F1 Data Node 3 Data Node 4 F2 F4 F4 F2 Group1 Table T1 P2 P3 P4 P1 Data Sharding + Replicação Group2
  • 61. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1265 Desafios do desenvolvedor #4 + #5 É possível ter alta-disponibilidade e escalabilidade com menor esforço de implementação?
  • 62. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1266 MySQL Cluster • Arquitetura shared-nothing in-memory parallel • Modelo relacional ACID, SQL Carrier Grade Database • 99.999% de disponibilidade • Self-healing, failover abaixo de 1 segundo Alta Disponibilidade • Performance em tempo real para altas cargas • Latência baixa e preditiva Alta Performance • Elasticidade, crescimento incremental • Escalabilidade linear, distribuition aware Escalabilidade • Open Source, hardware commodity • APIs NoSQL (C++, Java, Memcached, Node.js) Open Source
  • 63. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1267 Alguns Clientes MySQL Cluster
  • 64. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1268 Alguns Clientes MySQL Cluster
  • 65. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1269 MySQL Cluster Data Nodes Data Layer Clients Application Layer Management mgm_ndbd MySQL Cluster: auto-sharding Table T1 P2 P3 P4 P1F1 F3 F3 F1 F2 F4 F4 F2 Management mgm_ndbd mysqldmysqld ndbd ndbd ndbd ndbd
  • 66. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1270 MySQL Cluster Data Nodes Data Layer Clients Application Layer Management mgm_ndbd MySQL Cluster: alta-disponibilidade Table T1 F1 F3 F3 F1 F2 F4 F4 F2 Management mgm_ndbd mysqldmysqld ndbd ndbd ndbd ndbd
  • 67. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1271 MySQL Cluster Data Nodes Data Layer Clients Application Layer Management MySQL Cluster: auto-sharding Table T1 P2 P3 P4 P1F1 F3 F3 F1 F2 F4 F4 F2 Management
  • 68. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1272 •2 milhões usuários, com 30.000 novos usuários por dia •10.000 usuários concorrentes •10.000 Transações Por Segundo •99.999% uptime “The MySQL support service has been essential in helping us for troubleshooting and giving recommendations for the production cluster.” Carlos Morales (DBA), Playfulplay.com blogs.oracle.com/MySQL/entry/mysql_cluster_powers_el_chavo Caso de sucesso
  • 69. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1273 Bônus para o desenvolvedor Escreva via NoSQL (schemaless) e consulte via SQL
  • 70. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1274 Os mesmos dados acessados simultaneamente através de interfaces SQL e NoSQL APIs de Acesso aos Dados
  • 71. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1275 <estado:SP,Campinas> prefix key value <estado:SP,Campinas> key value Prefix Table Key-col Val-col policy estado: mapa.cidades sigla_estado cidade cluster Config tables sigla_estado ... cidade ... SP ... Campinas ... Tabela cidades do DB mapa visão da Aplicação visão MySQL Cluster Cluster & Memcached Schema configurável SELECT * FROM mapa.cidades WHERE cidade LIKE ’C%’;
  • 72. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1276 Exemplos Memcached API On-demand Webinar: NoSQL Memcached API for MySQL Cluster 22 August 2012 mysql.com/news-and-events/on-demand-webinars/display-od-723.html
  • 73. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1277 Exemplos JavaScript / Node.js API Blog: Tutorial Getting Started with the NoSQL JavaScript / Node.js API for MySQL Cluster 10 June 2012 blogs.oracle.com/MySQL/entry/tutorial_getting_started_with_the
  • 74. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1278 MySQL Cluster Auto-Install (beta)  Simples de instalar e provisionar clusters multi-node  Complementa MySQL Cluster Manager no gerenciamento de cliclo de vida
  • 75. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1279 1. Download MCM/Cluster edelivery.oracle.com: 2. Unzip e execute o comando com usuário diferente de root: MySQL Cluster Manager Para testes em uma única máquina C:MySQLmcmbin> mcmd --bootstrap MySQL Cluster Manager 1.1.2 started Connect to MySQL Cluster Manager by running “C:MySQLmcmbinmcm" -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 “C:MySQLmcmclusterbinmysql" -h NOVA -P 3306 -u root
  • 76. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1280 Mais sobre como começar com MySQL Cluster Whitepaper: MySQL Cluster Evaluation Guide February 2012 mysql.com/why-mysql/white-papers/mysql- cluster-evaluation-guide/
  • 77. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1281 Sumário  O MySQL é o banco de dados open source mais popular do mundo, usado em grandes sites, games, aplicações mobile e embarcadas.  Há várias opções de arquiteturas e APIs, oferecendo enorme flexibilidade, escalabilidade e alta-disponibilidade.  Instale e comece a usar em menos de 15min. Use e abuse da documentação!
  • 78. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1282 @MySQLBR meetup.com/MySQL-BR facebook.com/MySQLBR Obrigado!
  • 79. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1283 Perguntas? MySQL para Desenvolvedores
  • 80. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1284 MySQL Boot Camp Accelerated MySQL Performance Tuning Boot Camp Accelerated MySQL for Begginers MySQL for Database Administrators MySQL Performance Tuning MySQL High Availability MySQL Cluster MySQL DBA MySQL Boot Camp Accelerated MySQL for Developers MySQL Performance Tuning Boot Camp Accelerated MySQL for Begginers MySQL and PHP Developing Dynamic Web Applicationg MySQL Advanced Stored Procedures MySQLDeveloper mysql.com/training Certificações Opcional Necessário Treinamentos e certificações
  • 81. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1285 Clients & Connectors Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl Connection Pool, SQL Interface, Parser, Optimizer, Caches Enterprise Management Services and Utilities Backup & Recovery Monitor Workbench Utilities mysqld Clients and Apps Arquitetura MySQL Server Storage Engines InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc… Filesystems, Files and Logs Data, Index, Redo, Undo, Binary, Error, Slow
  • 82. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1286 Storage Engines MyISAM InnoDB NDB Cluster Transações ✖ ✔ ✔ Nível de Lock Tabela Linha Linha Replicação Assíncrona ou Semi-síncrona Assíncrona ou Semi-síncrona Síncrona, Multi-master Foreign Keys ✖ ✔ a partir da v7.3 Full-text indexes ✔ a partir da v5.6 ✖ Compressão de dados somente Leitura ✔ ✖ Caches somente Índices Dados e Índices Dados e Índices Suporte Geospacial Tipos de Dados e Índices somente Tipos de Dados somente Tipos de Dados Limite de armazenamento 256TB 64TB 384EB dev.mysql.com/doc/refman/5.5/en/storage-engines.html