• Save
introduction to Polyglot Persistence
Upcoming SlideShare
Loading in...5

introduction to Polyglot Persistence



an first introduction to polygot persistence

an first introduction to polygot persistence



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

introduction to Polyglot Persistence introduction to Polyglot Persistence Presentation Transcript

  • POLYGLOT PERSISTENCE choosing the right persistence option for the task at handThursday, May 17, 12
  • > WHOAMI @gertfindel prof@puc tech@acidlabsThursday, May 17, 12
  • “if you only have a hammer, you tend to see every problem as a nail” - Maslow’s MaximThursday, May 17, 12
  • sql Structured Query Language ACID “Normalization is good” SELECT isbn, title, price FROM Book WHERE price < AVG (SELECT price FROM Book) ORDER BY title;Thursday, May 17, 12
  • Scaling RDBMS Launch successful service Read saturation: add caching Write saturation: add hardware Queries slow down: denormalize Reads still too slow: prematerialise common queries, stop joining Writes too slow: drop secondary indexes and triggersThursday, May 17, 12
  • nosql No SQL as query lang. Distributed architecture Not necessarily ACID > BASE: Basically Available, Soft State, Eventually Consistent > CAP: Consistency, Availability, Partition ToleranceThursday, May 17, 12
  • NoSQL Flavors Document Store CouchDB, SimpleDB Graph Neo4j, FlockDB Key-Value store Riak, Cassandra Tabular BigTable, Hadoop RDF SPARQL basedThursday, May 17, 12
  • Thursday, May 17, 12
  • it’s not about SQL vs. NosqlThursday, May 17, 12
  • it’s not about SQL vs. Nosql it’s all about SQL+ NosqlThursday, May 17, 12
  • USE CASE: ____ social network - crowdfunding presents transactions API MySQL mobile logs re com men da tio cat ns Redis alo g Neo4j web Mongo soon at http://bufys.comThursday, May 17, 12
  • USE CASE: ____ Open Graph: Graph DB for Relationships FB.api(/me/friends, function(response) { friends = response.data; for ( var i = 0; i < friends.length; i ++ ) { handle( friends[i] ); } });Thursday, May 17, 12
  • USE CASE: ____ MySQL: RDBMS for Transactions need to re-assemble data in different ways - native avg, count and more. ACID transactions needed $$Thursday, May 17, 12
  • USE CASE: ____ Redis: Key/Value Store for User Activity Log High volume of writes on multiple nodes Rescue complete log per user Logs are in memory and might be distributedThursday, May 17, 12
  • USE CASE: ____ Neo4j: Graph DB for RecommendationsRapidly traverse links between friends, pledges, taggings and ratings Type = Event es Pledg Name = Gert Type = Person created Name = Mauko Type = Person Kno s w s Name = Alex Know Type = PersonThursday, May 17, 12
  • USE CASE: ____ Mongo: BSON Key/Value Store Product Families are very different => Schemaless { name: “Macbook Pro 2011”, Products make natural aggregate P[1]: price: “2000”, inches: “13” } Lots of reads, infrequent writes { name: “Chilean Computer”, P[2]: price: “1500000”, currency: ”CLP” inches: “13” }Thursday, May 17, 12
  • MY 2 CENTS • Decision based on 3V’s: volume, variety and velocity • Feature lists should be used only in apples-to-apples comparisons. • Don’t use a RDBMS as a hammer. • Don’t use a NoSQL db just because. • Don’t use both just because it *might* be fun.Thursday, May 17, 12
  • THANKS FOR COMING ... and give NoSQL a chanceThursday, May 17, 12