+ All Categories
Home > Education > NoSQL e Python

NoSQL e Python

Date post: 24-Jun-2015
Category:
Upload: fernando-masanori
View: 1,162 times
Download: 0 times
Share this document with a friend
59
NoSQL e Python TDC2012 @fmasanori http://www.slideshare.net/fmasanori
Transcript
Page 1: NoSQL e Python

NoSQL e Python TDC2012

@fmasanori http://www.slideshare.net/fmasanori

Page 2: NoSQL e Python

• Conhecendo o palestrante

• Conhecendo os assistentes

• Python vale a pena

• NoSQL vale a pena

• Demo:

• MongoDB, Redis e Cassandra

• Facebook e Twitter

• Perguntas

Page 3: NoSQL e Python

Conhecendo o palestrante

Page 4: NoSQL e Python

• IME-USP e Mestrado ITA

• ed e lint Cobra Tecnologia

• Software Express

• Credicard Mastercard

• PriceWaterhouseCoopers

• Itau BankBoston

• Docente FATEC (amo dar aulas)

• Interesses: Python, NoSQL, Google Technology, Facebook

Page 5: NoSQL e Python

Conhecendo os assistentes • Graduandos?

• Docentes?

• Python?

• MongoDB?

• Cassandra?

• Redis?

Page 7: NoSQL e Python

Valeu TDC!

O melhor local para conseguir isso

Page 9: NoSQL e Python

Python vale a pena

Page 10: NoSQL e Python

Python vale a pena

Page 11: NoSQL e Python

Job Trends (indeed.com)

Page 12: NoSQL e Python
Page 13: NoSQL e Python

Meta 20% mulheres em 2015

http://pyladies.com/

Page 14: NoSQL e Python

NoSQL vale a pena

Page 15: NoSQL e Python

Job Trends (indeed.com)

Page 16: NoSQL e Python

Job Trends (indeed.com)

Page 17: NoSQL e Python

Job Trends (indeed.com)

Page 18: NoSQL e Python

O que as empresas esperam de um NoSQL?

Dynamic Schema

Page 19: NoSQL e Python

Flexible Schema

O que as empresas esperam de um NoSQL?

Page 20: NoSQL e Python

• Escalabilidade para leituras num banco

relacional: trabalhoso

• Escalabilidade para escritas num banco relacional: MUITO, MUITO, trabalhoso

(se conseguir ele deixou de ser relacional...)

Escalabilidade vertical

Page 21: NoSQL e Python

Escalabilidade vertical

Page 22: NoSQL e Python

If I had asked people what they wanted, they would have said faster

horses. Henry Ford.

Page 23: NoSQL e Python

Escalabilidade horizontal

Page 24: NoSQL e Python

Escalabilidade horizontal

Page 25: NoSQL e Python

Dois artigos famosos

• Bigtable: A distributed storage system for structured data, 2006

• Dynamo: Amazon’s highly available key-value store, 2007

Page 26: NoSQL e Python

Apache Hadoop

Page 27: NoSQL e Python

Not Only SQL

Page 28: NoSQL e Python

Melhor NoSQL?

Page 29: NoSQL e Python

• JSON oriented • Autosharding • Full featured indexes

Page 30: NoSQL e Python

import pymongo

Tutorial completo de MongoDB com Python:

http://pyvideo.org/video/914/mongodb-and-python

https://github.com/behackett/presentations/tree/mast

er/pycon_2012

Dowload and install:

http://www.mongodb.org/downloads

Criar c:/data/db

Servidor:

bin/mongod

Cliente:

bin/mongo

Cliente pymongo:

http://api.mongodb.org/python/current/

Page 31: NoSQL e Python

Cassandra: • Linearly Scalable • Column based

Page 32: NoSQL e Python

Cassandra vs MySQL (50GB)

MySQL:

~300ms write

~350ms read

Cassandra:

~0.12ms write

~15ms read

Page 33: NoSQL e Python
Page 34: NoSQL e Python

Banco Relacional Tradicional

(Timo Elliott, SAP)

Page 35: NoSQL e Python

Banco Colunar

(Timo Elliott, SAP)

Page 36: NoSQL e Python

Download DataStax Community Edition

Servidor:

cassandra

Cliente:

cassandra-cli –h localhost –p 9160

Conflitos:

cassandra.bat (windows)

/etc/cassandra/cassandra-env.sh (ubuntu)

Cliente pycassa:

https://github.com/pycassa/pycassa/downloads

import pycassa

Page 37: NoSQL e Python

• Data Structure Server • In-memory dataset

Page 38: NoSQL e Python

• CPU performance 175X (96) • Os discos continuam iguais • Memory 1M faster • 1M = $1 (2000) x 1 cent (2010)

Page 39: NoSQL e Python

http://redis.io/download

https://github.com/MSOpenTech/redis

(for Windows)

Servidor:

redis-server

Cliente:

redis-cli

Cliente redis-py:

https://github.com/andymccurdy/redis-py

import redis

Page 40: NoSQL e Python

Talk is cheap.

Show me the code. Linus Torvalds

Page 41: NoSQL e Python

Servidor MongoDB

Page 42: NoSQL e Python

Servidor Cassandra

Page 43: NoSQL e Python

Servidor Cassandra

Page 44: NoSQL e Python

Servidor Redis

Page 45: NoSQL e Python

Dados Facebook e Twitter

Page 46: NoSQL e Python

Pymongo

Page 47: NoSQL e Python

Redis-py

Page 48: NoSQL e Python

Pycassa

Page 49: NoSQL e Python

Pymongo response

Page 50: NoSQL e Python

Redis-py response

Page 51: NoSQL e Python

Pycassa response

Page 52: NoSQL e Python

Mantenha-se em movimento

“A vida é como andar de bicicleta. Para manter o equilíbrio, é preciso se manter em movimento”. Einstein.

Page 53: NoSQL e Python
Page 54: NoSQL e Python

Bibliografia

Page 55: NoSQL e Python

Bibliografia

Page 56: NoSQL e Python

Bibliografia

Page 57: NoSQL e Python

Bibliografia

Page 58: NoSQL e Python

Bibliografia


Recommended