55

The good, the bad and the big... data

Embed Size (px)

DESCRIPTION

Palestra sobre Big Data apresentada na Campus Party Brasil 2013, Parque Anhembi, São Paulo - 02/02/2013

Citation preview

Page 1: The good, the bad and the big... data
Page 2: The good, the bad and the big... data

THE GOOD,THE BAD,THE BIG... DATA

Processando Grandes Volumes de Dados

Rodrigo [email protected]@xinu

Page 3: The good, the bad and the big... data

Agenda

•Big what?•Tecnologias•Conclusões

Page 4: The good, the bad and the big... data

IBM 350 - 1956Discos 24”1.200 RPM8.800 CPS3,75 MbUSD 53.400 / Mb

Page 5: The good, the bad and the big... data

Kingston HyperXUSB 3.030.000.000 CPS1.000.000 MbUSD 0,0017 / Mb

Page 6: The good, the bad and the big... data

Fonte: http://www.jcmit.com/disk2012.htm

Page 7: The good, the bad and the big... data

90% dos dados atualmente no mundo foram criados nos

últimos dois anos

Fonte: http://ibm.co/WDPldm

Page 8: The good, the bad and the big... data

1,8Zb foram criados ou replicados em 2011.

Fonte: IDC iView - Extracting Value from Chaos - http://bit.ly/YwR8nb

1.800.000.000 Tb

Page 9: The good, the bad and the big... data
Page 10: The good, the bad and the big... data
Page 11: The good, the bad and the big... data

Não se trata apenas da quantidade de dados

Page 12: The good, the bad and the big... data

Os dados tradicionalmente eram organizados em

esquemas conhecidos, rígidos e controlados

Page 13: The good, the bad and the big... data

SELECT vw_Subscriber.DisplayName, vw_CallHandler.DTMFAccessId AS Extension, vw_ContactRule.Extension AS 'Transfer String'FROM vw_Subscriber INNER JOIN vw_CallHandlerON vw_CallHandler.CallHandlerObjectId=vw_Subscriber.CallHandlerObjectIdINNER JOIN vw_ContactRuleON vw_ContactRule.ParentObjectId=vw_CallHandler.CallHandlerObjectIdWHERE vw_CallHandler.IsPrimary='1' AND vw_Subscriber.SubscriberType IN ('1','3') AND vw_ContactRule.Alias='alternate' AND vw_ContactRule.Action='1

Page 14: The good, the bad and the big... data

Dados pouco uniformesExtensible Markup Language

Comma Separated Values

Spreadsheets

Text Files

SYSLOG

Document Oriented

Graph Databases

Hypermedia Databases

Spatial Databases

In-Memory Databases

Message Queues

Flat files

Hierarchical Model

Network Model Relational Model

Object-relational

Page 15: The good, the bad and the big... data

Os dados tradicionalmente eram gerados por

computadores

Page 16: The good, the bad and the big... data

0100100100101010010101010000101010110010100101011100101101010010010010010101001001010011101001001001010010010100101010001010101110010100101001010011111001010101010010010010010

Page 17: The good, the bad and the big... data

Fontes de dados são diversificadas

Page 18: The good, the bad and the big... data

O armazenamento e processamento dos dados

tradicionalmente era centralizado

Page 19: The good, the bad and the big... data

0100100100101010010101010000101010110010100101011100101101010010010010010101001001010011101001001001010010010100101010001010101110010100101001010011111001010101010010010010010

Page 20: The good, the bad and the big... data

Os volumes ultrapassam a capacidade individual dos

bancos de dados

Page 21: The good, the bad and the big... data

Lead ION Collision - ALICE experiment at CERN25 Petabytes por anoLHC Computing Grid - 170 datacenters em 36 paíseshttp://wlcg.web.cern.ch/

Page 22: The good, the bad and the big... data

Precisamos de soluções e ferramentas novas para:

ExtraçãoArmazenamentoProcessamento

Visualização

Page 23: The good, the bad and the big... data

Extração Armazenamento

ProcessamentoVisualização

Big Data

Page 24: The good, the bad and the big... data

Extração

Data ScrapingAPIs

Page 25: The good, the bad and the big... data

Data Scraping

Page 26: The good, the bad and the big... data

API

Page 27: The good, the bad and the big... data

Armazenamento

Sistemas distribuídos

Page 28: The good, the bad and the big... data

Sistemas distribuídos

Desafios para o design:Escala

GerenciamentoSegurança

Tolerância a falhas

Page 29: The good, the bad and the big... data

Processamento

A panacéia NoSQL

Page 30: The good, the bad and the big... data

Processamento

Não existe bala de prata...

Page 31: The good, the bad and the big... data

Processamento

Não existe bala de prata...

Page 32: The good, the bad and the big... data

Processamento

Nunca existiu bala de prata...Existem soluções mais

apropriadas para determinados problemas

Page 33: The good, the bad and the big... data

Processamento

O modelo relacional dominou os últimos 30 anos

Page 34: The good, the bad and the big... data

Processamento

Agora procuramos usar a solução mais adequada para

o problema encontrado

Page 35: The good, the bad and the big... data

Bancos de dados de documentos

Desenhados para o gerenciamento de informação

semi-estruturada

Page 36: The good, the bad and the big... data

Bancos de dados de documentos{ "Cats": [ { "Age": 5, "EyeColor": "Blue", "Name": "Agatha" }, { "Age": 4, "EyeColor": "Blue", "Name": "Frank" } ], "FirstName": "Rodrigo", "LastName": "Campos", "TwitterScreenName": "xinu"}

Page 37: The good, the bad and the big... data

Chave-valor

Desenhados para armazenamento arbitrário de

informações em pares

Page 38: The good, the bad and the big... data

Chave-valor

userCount 1user1_FirstName Rodrigouser1_LastName Camposuser1_Twitter xinuuser1_CatCount 2user1_Cat1_Name Agathauser1_Cat1_Age 5user1_Cat2_Name Frankuser1_Cat2_Age 4

Page 39: The good, the bad and the big... data

Grafo

Desenhados para estruturas baseadas em vértices e

arestas com propriedades

Page 40: The good, the bad and the big... data

Grafo

Id: 1FirstName: RodrigoLastName: Campos

Twitter: xinuType: human

Id: 2Name: FrankEyes: Blue

Age: 4Type: cat

Id: 3Name: Agatha

Eyes: BlueAge: 5

Type: cat

Id: 100Label: master

Id: 101Label: servant

Id: 102Label: servant

Id: 103Label: master

Id: 105Label: friends

Id: 104Label: friends

Page 41: The good, the bad and the big... data

ProcessamentoBancos de dados de

documentos Chave-Valor Grafo

•Cassandra•CouchDB•MongoDB•Couchbase•Lotus Notes

•Cassandra•Riak•Memcached•Redis•Kyoto Cabinet

•AllegroGraph•Neo4J•FlockDB•InfiniteGraph

Page 42: The good, the bad and the big... data

MapReduce

Um modelo de programação distribuída para o

processamento de grandes conjuntos de dados

Page 43: The good, the bad and the big... data

MapReduce

Problema:Contar os elementos separando pelas cores

Page 44: The good, the bad and the big... data

MapReduce

Dados originais

Master Node

MAP

Node 1

Node 2

Node 3

Node 4

Node 5

REDUCEx2 x4

x1x3

x3

x2

x5

Resultado

Page 45: The good, the bad and the big... data

Processamento

Atomic: toda a transação deve ser bem sucedida

Consistent: o banco de dados deve permanecer consistente

Isolated: uma transação não deve interferir nas demais

Durable: transações completadas devem persistir

Page 46: The good, the bad and the big... data

Processamento

Basic Availability: a camada de dados permanece (parcialmente) disponível mesmo que inconsistente

Soft-state: os dados retornados para determinada transação podem ser aproximados ou estimados

Eventual consistency: eventualmente os dados estarão homogêneos em todo o sistema

Mais informações em http://bit.ly/14Bg7GD

Page 47: The good, the bad and the big... data

Teorema CAP - Escolha duas...

Consistency

Availability PartitionTolerance

Page 48: The good, the bad and the big... data

Visualização

Fonte: http://bit.ly/14BhZz8

Page 49: The good, the bad and the big... data

Visualização

Fonte: http://inmaps.linkedinlabs.com

Page 50: The good, the bad and the big... data

Visualização

Fonte: http://bit.ly/YoJrM2

Page 51: The good, the bad and the big... data

Visualização

Fonte: http://bit.ly/UJZIeO

Page 52: The good, the bad and the big... data

Conclusões

O volume e diversidade dos dados exigem novas

abordagens tecnológicas

Page 53: The good, the bad and the big... data

Conclusões

Novas ferramentas vem complementar soluções

estabelecidas no mercado

Page 54: The good, the bad and the big... data

Conclusões

As ferramentas ainda estão evoluindo para atender essa

nova realide