• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
NoSQL Smackdown!
 

NoSQL Smackdown!

on

  • 2,405 views

A whirlwind tour of a few NoSQL solutions, learning the very different ways they represent data and seeing their unique strengths and weaknesses in various kinds of applications. Along the way, we'll ...

A whirlwind tour of a few NoSQL solutions, learning the very different ways they represent data and seeing their unique strengths and weaknesses in various kinds of applications. Along the way, we'll learn why new technologies must be introduced to address today's scaling challenges, and what compromises we'll have to make if we want to abandon the databases of our youth.

Statistics

Views

Total Views
2,405
Views on SlideShare
2,405
Embed Views
0

Actions

Likes
4
Downloads
48
Comments
1

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Great coverage! I'd be interested to see how OrientDB (http://orientdb.org/) compares to these options.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    NoSQL Smackdown! NoSQL Smackdown! Presentation Transcript

    • oSQLN ACKDOWNSM Tim Berglund 1
    • @tlberglund #nosql 2
    • Voldemort 3
    • vianegativa 4
    • SQL 5
    • relation (n.) An unordered set of tuple (n.)the same type. tuples of 6
    • tuple (n.) A function that maps attributes to values. 7
    • tuple (n.) (A bundle of key-value pairs—but don’t tell anyone!) 8
    • id username pwd_hash born_at monkey1 mluther d8c82af9 Nov 1483 FALSE2 aaugustine 329b8dae Nov 354 FALSE3 gnyssa e50ec9e0 Jun 335 FALSE4 bonzo 330e01f2 Apr 2007 TRUE 9
    • Relations 10
    • Comparing “NoSQL” to“relational” is a bit of ashell game. —Eben Hewitt author of Cassandra: The Definitive Guide 11
    • Transactions 12
    • CAP Theorem C A P 13
    • Tradeoff Between Consistency Availability Partition Tolerance 14
    • Between what? 15
    • consistency (n.) All clients always have the same view of the data. 16
    • availability (n.) All clients can always read or write within some maximum latency. 17
    • partition tolerance (n.) No set of failures less than total network failure is allowed to cause the system to respond incorrectly. 18
    • Cluster Node Cluster NodeCluster Node Cluster Node 19
    • Cluster Node Cluster Node SwitchCluster Node Cluster Node 20
    • Cluster Node Cluster Node SwitchCluster Node Cluster Node 21
    • CAP Theorem C A P 22
    • Strongly Consistent MongoDB C Cassandra A P 23
    • Always Available CouchDB Riak C Voldemort Cassandra A P 24
    • Partition Intolerant MySQL C OracleSQL Server Neo4J Redis A P 25
    • CA P 26
    • vianegativaa way forward 27
    • NoSQL is a set of differentapproaches to storing and retrieving data. 28
    • What’s Different? Data models Querying Approaches to scale 29
    • TradeoffsComplex transactions vs. scalabilityConsistency vs. availability (often)Performance vs. durabilityHorizontal vs. vertical scaleCheap writes vs. cheap reads 30
    • Origin LicenseI mplementati on language Data model How d oes it scale? API/Qu ery language Deployments Support and community 31
    • 32
    • Voldemort 33
    • 34
    • Origin- Facebook Inbox search b ack in 2007License- Apache Public License 2.0 35
    • Implementa tion Language- Java 6Data Model- It’s a Big-Table-based “c olumn store.” 36
    • Name Value Timestamp Column 37
    • email tlberglund@gmail.com 20101011T120502Z Column 38
    • Key Column Column Column Column Column Row 39
    • Key Column ColumnKey Column Column ColumnKey Column Column Family 40
    • bbf77f01d full_name email050fe74e2 full_name email mobile8b20d8f6 full_name “Contacts” Column Family 41
    • Name key Column key Column key Column SuperColumn 42
    • 4145bfaf15f10c2e6033f8b9c3143297a36f5fe3 full_name full_name Tim Berglund 20101011T120502Z email email tlberglund@gmail.com 20101011T120503Z mobile mobile [redacted] 19940217T145637Z postal_code postal_code 80123 20101011T120452Z Contact Info SuperColumn 43
    • Key SuperColumn SuperColumnKey SuperColumn SuperColumnKey SuperColumn SuperColumn Family 44
    • SuperColumn FamilySuperColumn FamilySuperColumn Family Column Family Column Family Keyspace 45
    • A what? 46
    • Nested Hash TableCluster.Keyspace.ColumnFamily[key1][key2] = <column> Cluster.Keyspace.ColumnFamily[key] = <row> ...SuperColumnFamily[key1][key2][key3] = <column> ...SuperColumnFamily[key1][key2] = <row> ...SuperColumnFamily[key] = <map of rows> 47
    • Scalability- Rock star! (see Amazo n Dynamo) 0000 2000 E000 4000 C000 6000 A000 8000 48
    • 0000 E000 2000C000 4000 A000 6000 8000 49
    • Scalability - Consist ent hashing - No disting uished nodes - Add and re move nodes on a live cluster 50
    • API - Thrift RPC - Easy to fet ch columns by key - Nat ive clients - Hadoop integration 51
    • Deployments- 52
    • Sup port/Community- - www .datastax.com - Eben H ewitt’s book - Plus , it is an Apache project... 53
    • Voldemort 54
    • 55
    • Origin- Founders of DoubleClick were tota lly going to take o ver the CloudLicense- Database: G NU Affero 3.0 D rivers: APL 2 56
    • Implementatio n Language- C++D ata Model- JSON documen t database (this is so simple!) 57
    • { "_id" : ObjectId("4cbd00455280f73d395922a4"), "contact" : { "tags" : ["man", "", "", ""] "firstName" : "Myron", "lastName" : "Dalton", "address1" : "4322 Maple Street", "city" : "Santa Ana", "state" : "CA", "postalCode" : "92705", "email" : "Myron.C.Dalton@spambob.com" }, "occupation" : "Long haul truck driver"} 58
    • Does it scale? Well...it shards! 59
    • API - Native JavaScript console - Bin ary drivers - Ad-hoc q uery language ( but it’s NOT S QL, okay?) 60
    • db.address.find().limit(5)db.contact.find({ “lastName”: “Berglund” })db.address.find({ $query: { “stateProvince”: “CO” }, $orderBy:{ “city”: 1 } })db.address.find({ “contact.city”: “Chicago” })db.address.remove({_id: ObjectId("4cbcfd7df72291161b1d1bf2")}) 61
    • API - Can writ e MapReduce jobs in JavaScript - Morph ia for Java - Mongoos e for node.js 62
    • D eployments- 63
    • Communi ty/Support - www.10gen.com - Proba bly the NoSQL minds hare leader 64
    • Concerns - Write durability? Journa ling coming in 1.8! - Sharding p erformance - But everyone still wants to date her 65
    • Voldemort 66
    • 67
    • Origin -N eo Technolog ies in 2003 -Malmö and San Francisco 68
    • License - GPL3, f ull-featured -C ommercial $49/ mo antiviral $499/mo advanced $1,999/mo enterprise 69
    • Maturity - Productio n since 2003 - 1.0 i n Feb 2010Implementat ion Language - Java 6 - Easil y embeddable! 70
    • Da ta Metaphor - Graph - Nodes, re lationships 71
    • All nodes and relationships have arbitrary properties 4CG 7L CN? M QCN B 7I >CMJ %HA NCIH -;NNB?Q LEM ON; ;A? QCNB QCNB M CH EM(IFFSQII> ?; 4SJ?M 3J CNB Q +HIQM "LC;H 72
    • Query Model - REST/JSON - Java traversal API - Bindings in C lojure, Ruby, Python, PHP, S cala, Grails - JTA/JTS XA 73
    • Scale Idiom - Traditional ly focused on si ngle-node pe rformance- Recent HA support -M aster/slave - ZK mast er election - Writeable slaves 74
    • Support- Neo TechnologiesDeployments - Box.net -T houghtWorks 75
    • Voldemort 76
    • 77
    • Origin- Internal datastore for Basho’s S alesforce.com apps (Hey, it seemed like a good idea at the time!) 78
    • License- APL 2 fo r OSS version Clo sed-source “Enterprise DS” version 79
    • Implementatio n Language- Erlang, C, S piderMonkey Ja vaScript VMData Model- Key/va lue store, but w ith buckets! 80
    • Key Value That’s it. 81
    • Key Value Key ValueKey Value Key Value Bucket AKey Value Key ValueKey Value Key Value Bucket B 82
    • name Tim birthday 061972occupation Developer city Littleton Bucket A name Aurelius birthday 110354occupation Bishop city Hippo Bucket B 83
    • Does it scale? - Like a boss! - No distin guished node - Tunable consistency, replication - Add n odes without taking the cluster down 84
    • API - HTTP interface (slow, but featureful) - Proto col Buffers (a performa nce beast) 85
    • API - Key CRUD- Ma pReduce in JavaScript- Grap h traversals translate t o MapReduce 86
    • D eployments- 87
    • Communi ty/Support - www.basho.com 88
    • Voldemort 89
    • 90
    • Origin- Salvatore Sanfilippo w rote it for his analytics s ite, llogg.comLicense- Open Sou rce-Brand open source 91
    • Implementat ion Language - ANSI C, baby - Wan ts a POSIX OS - 340kB download! 92
    • Data Model -Key/ value store++ -Strings -Hashes, Sets -Lists -Sorted Sets 93
    • Does it scale? - Ve rtically, sure - Plus it’s really fast - Master/sl ave options - Technically a CA system 94
    • API - Binary socke t interface - Dr ivers for 22+ languages - Comm ands look like assem bly language 95
    • 96
    • 97
    • 98
    • 99
    • D eployments- craigslist 100
    • Commun ity/Support - Offici ally sponsored by VMware 101
    • Voldemort 102
    • Do you need this? Maybe. 103
    • 104
    • Thank You Tim Berglund www.augusttechgroup.comtim.berglund@augusttechgroup.com @tlberglund 105
    • Further ReadingBrewer’s Conjecturehttp://www.podc.org/podc2000/Proof of Brewer’s Conjecture (the “CAP Theorem”)http://bit.ly/cap-theorem-proofAmazon Dynamohttp://bit.ly/amazon-dynamohttp://www.allthingsdistributed.com/2007/10/amazons_dynamo.htmlGoogle BigTablehttp://bit.ly/big-tableThe CAP Theorem Explainedhttp://www.julianbrowne.com/article/viewer/brewers-cap-theoremVisualzing NoSQL Databases on the CAP Venn Diagramhttp://blog.nahurst.com/visual-guide-to-nosql-systemsRedishttp://redis.io/Cassandrahttp://cassandra.apache.orgMongoDBhttp://mongodb.org 106
    • Further ReadingCouchDBhttp://couchdb.apache.orgRiakhttp://basho.comVoldemorthttp://project-voldemort.comNeo4Jhttp://neo4j.orgPretty Much Everything About NoSQLhttp://nosql.mypopescu.com 107
    • Photo CreditsWrestlershttp://www.flickr.com/photos/stigster/4573851095Desert Roadhttp://www.flickr.com/photos/kenlund/2439199670Kindergarten Graduationhttp://www.flickr.com/photos/moyermk/3102262394Clipboardhttp://www.flickr.com/photos/wheatfields/264890076Winning Wrestlerhttp://www.flickr.com/photos/jrandallc/2259174414 108