Mais conteúdo relacionado Semelhante a MySQL e Big Data (20) Mais de MySQL Brasil (20) MySQL e Big Data1. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL e Big Data
Airton Lastori
airton.lastori@oracle.com
maio/2015
2. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied
upon in making purchasing decision. The development, release, and timing of any
features or functionality described for Oracle’s products remains at the sole
discretion of Oracle.
Safe Harbor Statement
3. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Por que Big Data é importante?
US HEALTH CARE
$300 B
Aumenta valor anual da
indústria em
US RETAIL
60+%
Aumenta lucros da
indústria em
MANUFACTURING
–50%
Diminui custos de
engenharia em
GLOBAL PERSONAL
LOCATION DATA
$100 B
Aumenta o faturamento
dos serviços em
EUROPE PUBLIC
SECTOR ADMIN
€250 B
Aumenta o faturamento
dos serviços em
“Em um mundo Dig Data, um competidor que falhar ao
desenvolver suficientemente suas capacidades ficará para trás.”
McKinsey Global Institute
4. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Analistas falando sobre Big Data
“The area of greatest interest to my
clients is Big Data and its role in helping
businesses understand customers
better.”
“Almost half of IT departments in
enterprises in North America, Europe
and Asia-Pacific plan to invest in Big Data
analytics in the near future.”
Michael Maoz, Gartner
“Big Data Will Help Shape Your Market’s
Next Big Winners.”
Brian Hopkins, Forrester
Tony Baer, Ovum
“CIOs will need to be realistic about their
approach to 'Big Data' analytics and
focus on specific use cases where it will
have the biggest business impact.”
Philip Carter, IDC
5. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Aplicações mais comuns
• Recomendações na Web
• Análise de Comportamento/Sentimento
• Análise Campanha de Marketing
• Retenção de Clientes
• Detecção de Fraude
• Pesquisa e Desenvolvimento
• Modelagem de Risco
• Aprendizado de Máquina
Fonte: http://wikibon.org/blog/big-data-statistics/
Além de outras
aplicações que ainda
estamos
descobrindo…
6. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Caso de uso: Loja On-Line
Usuários
Navegação
Recomendações
Perfil,
Histórico de
Compras
Web Logs:
Páginas Visitadas,
Comentários, Posts
Interações em Mídias
Sociais, Preferências,
Marcas com “Curtir”
Recomendações
Conversas Telefônicas
7. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Caso de Sucesso
• sistema de publicidade online que
identifica o visitante e exibe
conteúdo direcionado ao seu perfil
• 2 TB de web logs são capturados,
com 22 bilhões de linhas por mês
processadas pelo MySQL
• Atualmente, considerando apenas
uma instância MySQL, há 8 TB de
dados armazenados com 5GB de
crescimento por dia
Big Data
“O MySQL é uma parte essencial da nossa estratégia
de Big Data. A integração com Hadoop permite-nos
melhorar e crescer o nosso negócio de publicidade
digital com rapidez e agilidade.”
Josafá Santos
IT Manager, boo-box
mysql.com/why-mysql/case-studies/1billion-advertisements-mysql-hadoop.html
8. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Não há consenso na definição, mas há fatos
O que é?
Big Data =
Datasets volumosos: 90% dos dados gerados nos últimos 2 anos
Crescimento muito rápido: ~50x maior velocidade
Fontes variadas:
web, dispositivos móveis, sensores, câmeras…
produção voluntária e não-volutária
de qualidade varíavel
Variabilidade de formatos: dados estruturados e não-estruturados
Se bem aproveitados, muitas oportunidades, muito valor
9. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Desafios Big Data
VOLUME VELOCIDADE VARIEDADE VARIABILIDADE
SOCIAL
BLOG
SMART
METER
101100101001
001001101010
101011100101
01010010
PROBLEMA: os sistemas convencionais não foram projetados para isso!
10. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Desisões baseadas em novos data sets
Transações
Arquitetura tradicional:
Decisões basedas nos dados do seu
banco de dados
Big Data:
Decisões baseadas em todos dados
capturáveis
Video e Imagens
Dados gerados por máquinas
Dados Sociais
Documentos
Transações
IoT
11. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fonte: 451 Group
12. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fonte: http://db-engines.com/en/ranking_trend (mai/15)
13. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Big Data Lifecycle
ANALYZE
DECIDE ACQUIRE
ORGANIZE
14. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Stack, pronto para usar
Acquire Organize Analyze Decide
Dados Web
Adquiridos
em MySQL
Analizados com
Oracle Exadata
Organizados com
Oracle Big Data
Appliance
Decida usando o
poder do Oracle
Exalytics
oracle.com/us/technologies/big-data/index.html
15. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL + Hadoop:
Integrados
*de acordo com fornecedores Hadoop
16. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
BI Solutions
ACQUIRE
ORGANIZEANALYZE
DECIDE
Hadoop
Applier
Big Data Lifecycle com MySQL+Hadoop
17. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Por que Hadoop? (1/3)
• Armazenamento de data sets de grandes volumes
• Processamento paralelo em grande velocidade
• Facilidade em tratar de fontes de dados variadas
• Variedade de formatos dos dados
–estruturados e não estruturados (schemaless)
18. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Por que Hadoop? (2/3)
Adoção
Fonte: http://blogs.gartner.com/merv-adrian/2015/02/18/hadoop-adoption-moving-but-not-necessarily-forward
19. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Por que Hadoop? (3/3)
Projetado para resolver problemas de Big Data
• Escalabilidade horizontal para milhares de nós
–Hardware commodity ou Cloud
• Alta-disponibilidade com replicação e self-healing
• Inicialmente modelo de processamento batch (Map/Reduce)
–Extensível com queries interativas via Apache Drill, Cloudera Impala,
Stinger etc.
21. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Interfaces
NoSQL para
MySQL Database
MySQL Cluster
Big Data Lifecycle com MySQL+Hadoop
ANALYZE
DECIDE
ORGANIZE
ACQUIRE
22. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL na fase ACQUIRE
benefícios e exemplos
• Consultas de análise em tempo real
–Resposta instantânea para processos de decisão
–Exemplo: detecção de fraude do PayPal utilizando MySQL Cluster
• Filtro inicial de dados, antes de carregar no Hadoop
–“Anonimização” dos usuários
–Exemplo: resultados de exames médicos, dados financeiros
• Dados que exigem maior segurança na origem
–Confirmação de autenticação, Auditoria, Backup
23. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
NewSQL
24. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 24
25. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Interface NoSQL no MySQL
Metas de Design: Velocidade, Flexibilidade e Segurança
Totalmente
transacionale
compatívelcom
ACID
Operações
Chave / Valor
commáxima
performance
NoSQL+ SQL
combinadosno
mesmodata set
Inclui também operações DDL online
26. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
<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
SELECT * FROM mapa.cidades
WHERE cidade LIKE ’C%’;
MySQL com Memcached
Schema Configurável
27. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance no MySQL 5.6
Throughput até 9x maior para “SET / INSERT”
0
10000
20000
30000
40000
50000
60000
70000
80000
8 32 128 512
TPS
Client Connections
MySQL 5.6: NoSQL Benchmarking
Memcached API
SQL
28. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster: Interfaces NoSQL
29. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
• NoSQL C++ API, flexaSynch benchmark
• 30 x Intel E5-2600 Intel Servers, 2 socket, 64GB
• ACID Transactions, Synchronous Replication
0
5
10
15
20
25
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
MillionsofUPDATEsperSecond
MySQL Cluster Data Nodes
20 Milhões de UPDATEs / seg
30. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Qual API devo usar com o MySQL Cluster?
SQL
• Padrão da
indústria
• Joins e
Queries
complexas
• Modelo
relacional
ClusterJ /
OpenJPA
• ORM Java
• Simplicidade
• Acesso nativo
e rápido ao
Cluster
• Ex: Web e
Telco
memcached
• chave/valor
• Simples de
usar
• Driver para
diversas
linguagens
• Ex: PHP
Proxy
node.js
• Javascript
• Mesma
tecnologia
do browser
no lado do
servidor
• Ex: Mobile
Apps
mod_ndb
• REST/JSON
• HTML
• Uso do
Apache
httpd
C++
• Performance
extrema
• Tempo real
• Desenvolved
or
experiente
• Mais baixo
nível
31. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Importe
Dados no Hadoop
com
Apache Sqoop
MySQL Hadoop Applier
Big Data Lifecycle com MySQL+Hadoop
ANALYZE
DECIDE ACQUIRE
ORGANIZE
32. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Apache Sqoop
• Apache Top Level Project, parte do projeto Hadoop
• Desenvolvido pela Cloudera
• Data import / export, em lote com schedule
• Entre o Hadoop (HDFS) e data stores externos
• Arquitetura JDBC Connector
• Suporta plug-ins para funcionalidades específicas
• Conector “Fast Path” para MySQL
Copyright 2013, Oracle and/or its affiliates. All rights reserved.
33. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Transactional
Data
HDFS StorageSqoop Job
Map
Map
Map
Map
Hadoop Cluster
Sqoop Import
Gather Metadata
Submit Map Only JobImport
34. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Hadoop Applier
Integração em tempo real do
MySQL para Hadoop
Cada tabela mapeada para
um diretório Hive data
warehouse
Possibilita usufruir de
ferramentas de análise do
eco-sistema Hadoop
Construído sobre MySQL
Binlog API e libhdfs library
Artigos dev.mysql.com
Download labs.mysql.com
35. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Mapeando MySQL no HDFS Schema
36. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Big Data Lifecycle com MySQL+Hadoop
Analise
Exporte Dados
Decida
ANALYZE
DECIDE
Copyright 2013, Oracle and/or its affiliates. All rights reserved.
37. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Copyright 2013, Oracle and/or its affiliates. All rights reserved.
38. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 40
39. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
HDFS StorageSqoop Job
Map
Map
Map
Map
Hadoop Cluster
Sqoop Export
Gather Metadata
Submit Map Only Job
Transactional &
Analytics Data
Export
40. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL como base de relatórios para BI
41. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
mysql.com/why-mysql/case-studies/1billion-advertisements-mysql-hadoop.html
Boo-box: arquitetura
42. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Arquitetura de Referência MySQL+Hadoop
Copyright 2013, Oracle and/or its affiliates. All rights reserved.
43. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Alta-disponibilidade + escalabilidade de escrita com sharding
MySQL Fabric (parte do MySQL Utilities)
• Alta disponibilidade:
– Monitoramento do Server com failover automático e
transparente para aplicação
• Conectores devem ser “Fabric-aware”:
– Java, PHP, Python
• Sem Proxy, sem latencia extra e SPoF
• Escalabilidade de escrita com sharding:
– Aplicação define a shard key (Range ou Hash)
– Ferramentas para re-sharding
– Tabelas globais & global updates
MySQL Fabric
Connector
Application
Read-slaves
SQL
Master group
Read-slaves
Master group
44. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 46
Próximos passos com MySQL e Big Data
Paper: MySQL and Hadoop
Instale: mysql.com/downloads
Hadoop Applier: alastori.com.br
Estes Slides:
slideshare.net/MySQLBR/mysql-e-big-data
1
2
3
4
Oracle Confidential – Internal/Restricted/Highly Restricted 46
45. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Whitepaper:
Unlocking New Big Data Insights with MySQL
2015
http://www.mysql.com/why-mysql/white-papers/mysql-and-
hadoop-guide-to-big-data-integration
Whitepaper
46. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Edition
Suporte + Backup + Monitor + Workbench + Plug-ins
Escalabilidade
Segurança
Firewall
Auditoria
Criptografia
Oracle Enterprise Manager
for MySQL
47. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL for
Beginners Ed 3
MySQL for Database
Administrators Ed 3.1
MySQL Performance
Tuning
MySQL High Availability
MySQL Cluster
MySQL DBA
Introduction to
MySQL 5.5
MySQL Developers
Techniques
MySQL for
Beginners Ed 3
MySQL and PHP
Developing Dynamic Web
Applications
MySQL for Developers Ed 2
MySQL Advanced Stored
Procedures
MySQL Developer
education.oracle.com/mysql
Opcional
Necessário
Oracle Certified
Professional, MySQL 5.6
DBA
Oracle Certified Expert,
MySQL Cluster DBA
Certificações
Oracle Certified
Professional, MySQL 5.6
Developer
Treinamentos e certificações
48. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
@MySQLBR meetup.com/MySQL-BRfacebook.com/MySQLBR
pt.planet.mysql.com
49. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 51
Passos para adoção do Big Data
Identificação de dados que pode usar
Internos (BD corporativo, departamentais, planilhas, logs) e Externos (parceiros,
fornecedores, governo, APIs públicas, mídias sociais)
Identificação de oportunidades consultoria, piloto
Infra tecnológia e organizacional nuvem, capacitação
Estratégia tecnológica CIO, CDO
1
2
3
4
Oracle Confidential – Internal/Restricted/Highly Restricted 51
50. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Copyright 2013, Oracle and/or its affiliates. All rights reserved.
Livro
eBook:
Big Data
Cezar Taurion, 2015
http://www.amazon.com.br/Big-Data-Cezar-Taurion-
ebook/dp/B00DENIEH6