Your SlideShare is downloading. ×
introduction to Polyglot Persistence
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

introduction to Polyglot Persistence

683

Published on

an first introduction to polygot persistence

an first introduction to polygot persistence

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
683
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. POLYGLOT PERSISTENCE choosing the right persistence option for the task at handThursday, May 17, 12
  • 2. > WHOAMI @gertfindel prof@puc tech@acidlabsThursday, May 17, 12
  • 3. “if you only have a hammer, you tend to see every problem as a nail” - Maslow’s MaximThursday, May 17, 12
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. NoSQL Flavors Document Store CouchDB, SimpleDB Graph Neo4j, FlockDB Key-Value store Riak, Cassandra Tabular BigTable, Hadoop RDF SPARQL basedThursday, May 17, 12
  • 8. Thursday, May 17, 12
  • 9. it’s not about SQL vs. NosqlThursday, May 17, 12
  • 10. it’s not about SQL vs. Nosql it’s all about SQL+ NosqlThursday, May 17, 12
  • 11. 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
  • 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
  • 13. 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
  • 14. 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
  • 15. 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
  • 16. 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
  • 17. 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
  • 18. THANKS FOR COMING ... and give NoSQL a chanceThursday, May 17, 12

×