nosql tucumanvalley-10
TRANSCRIPT
![Page 1: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/1.jpg)
Not only SQL
![Page 2: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/2.jpg)
¿Y este quién es?
Luis Lavena
Director de tecnología en AREA 17
Consultor y desarrollador en el area de video profesional (TV/Cable) por mas de 12 años.
Maintainer de RubyInstaller (for Windows)
http://www.area17.com
![Page 3: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/3.jpg)
¿Y qué es NoSQL?
Aquellos sistemas que no poseen un schema fijo.
Aquellos sistemas que no almacenan la infomación de una manera estructurada.
![Page 4: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/4.jpg)
¿Qué?
![Page 5: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/5.jpg)
RDBMS
MySQL, PostgreSQL, Oracle, MSSQL
Un registro esta formado por N cantidad de columnas que son consistentes para cada registro
Esos registros pueden ser incluidos o usados de referencia para otras consultas (join, etc)
![Page 6: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/6.jpg)
Ahora... NoSQL es...
Todo lo que no es RDBMS (Relational Database Management System)
Hay mas de un tipo de solución (siempre hay mas de un tipo de problema)
![Page 7: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/7.jpg)
Tipos de sistemas NoSQL
Document (CouchDB, MongoDB)
Key/Value (memcached, redis, Tokyo Cabinet, SimpleDB) – RAM o Disco
Graph (AllegroGraph, Neo4j)
Muchos más (http://nosql-databases.org/)
![Page 8: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/8.jpg)
Document Store
![Page 9: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/9.jpg)
Document Store
Hay un base o tipo de documento
Cada documento tiene sus propios atributos
Cada documento puede contener otros documentos propios de si.
![Page 10: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/10.jpg)
CouchDB
Usa standard de comunicación (HTTP)
Representacion de recursos (REST)
Fácil expansión usando proxy y load balancing)
http://couchdb.apache.org/
![Page 11: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/11.jpg)
MongoDB
Uso de JSON como formato de datos (BSON)
Propio sistema de conexión
Indexado
JavaScript como lenguaje de Query
Sharding
http://www.mongodb.org/
![Page 12: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/12.jpg)
Ejemplos
Fichas médicas
Registros de enfermedades
HowTos (Guias paso a paso)
Censos
![Page 13: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/13.jpg)
Key / Value (Diccionario)
![Page 14: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/14.jpg)
Key Value
Por cada k hay un v equivalente (k => v)
Principio básico de representación de objetos (hashes)
Conceptos y funcionalidades simplificados
![Page 15: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/15.jpg)
Memcached
Comandos sencillos
Rápido
Expiración automática de claves
Solo memoria, entre más, mejor.
http://memcached.org/
![Page 16: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/16.jpg)
Redis
Comandos sencillos
Rápido
Lo mejor de memcached, pero persistente
Más alla de memcached (Sets, Lists, Uniones, etc)
http://redis.io/
![Page 17: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/17.jpg)
Ejemplos
Cache en memoria (memcached)
Cache de fragmentos (memcached)
Friends y Followers (Redis)
Activity Feeds (Redis)
Twitter-clones (Redis)
Processing Queues (Redis)
![Page 18: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/18.jpg)
Graph
![Page 19: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/19.jpg)
Graph
Su objetivo principal no es los datos sino las relaciones entre ellos
Optimizados para resolver relaciones de 2do nivel o superiores.
![Page 20: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/20.jpg)
![Page 21: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/21.jpg)
neo4j
Graph Engine con almacenamiento de datos
Rápido (en memoria y persistente)
Nodos, relaciones, edges y propiedades
Plugins para queries complejos (Gremlin)
Java, con opción REST
http://neo4j.org/
![Page 22: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/22.jpg)
Ejemplos
Sistemas de recomendaciones (amigos, amigos de amigos, etc)
Followers y Following
Recomendaciones musicales (Last.FM)
Tags y relaciones (no clouds)
![Page 23: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/23.jpg)
Recordar:
Simpre hay una herramienta para cada problema.
No siempre por que se pueda hacer en SQL singnifica que se deba :-)
![Page 24: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/24.jpg)
¿Preguntas?
![Page 25: Nosql tucumanvalley-10](https://reader035.vdocuments.site/reader035/viewer/2022081401/5599dcc01a28abed5d8b4760/html5/thumbnails/25.jpg)
¡Muchas gracias a todos!
CC: attribution, non-commercial, share alike.