SlideShare a Scribd company logo
An Introduction to NoSQL
Brad Anderson - DevNexus
March 21, 2011
Me
‘boorad’ most places (twitter, github, etc.)
Erlang Programmer
  Cloudant BigCouch, Ericsson Monaco, Verdeeco
  Java, Python, D, Javascript, Common Lisp
NoSQL East - October 2009
Data Warehousing / Big Data
pre-lunch talks... always.
Agenda


NoSQL is BULLSHIT

You Don’t Need It

You Can’t Query It
The Name

Play on MySQL (Eric Evans, Rackspace)

Not Only SQL (Emil Eifrem)

Broad Umbrella

Shitty Marketing Term and we’re stuck with it
Why do you need NoSQL?
Why do you need NoSQL?




 YOU DON’T!
Seriously, you don’t...

Vastly different performance characteristics

Immature APIs and tools / ecosystems

Bugs, most are actively being developed

Your situation doesn’t warrant it
Why do they exist?
Every one of these new data storage systems
came from a particular pain someone was
having.
Each system was created to specifically solve
the pain point the authors were experiencing.
This pain usually involves a metric shit-tonne of
data and distributed processing is required.
Schema-free
Prediction: Pain
Examples
Google - index Internet (mapreduce/bigtable)
Yahoo - keep up with Google (Hadoop)
Amazon - shopping cart (Dynamo)
Facebook - inbox search (Cassandra)
Lotus - Notes legacy restrictions (CouchDB)
Cloudant - physics research (BigCouch)
Basho - CRM product (Riak)
Neo - graph traversal (Neo4J)
Pain of Scaling

Scale Reads with master-slave replication

Scale Writes with master-master replication

Partitioning Vertically (by functional groups)

Partitioning Horizontally (by key, i.e. ‘date’)

Caching works, kinda
What to do?

Distribute both data and processing

    horizontal scaling

Organize data differently

Use appropriate on-disk storage
Sorting Hat Says...


Distribution Model

Data Model

Disk Data Structure
Distribution Model

Embedded (no distribution)

Replication / Sharding

Chord - peer to peer

Dynamo

  consistent hashing, vnodes, vector clocks
No Distribution


BDB

Neo4J
Replication / Sharding
Distribution

MongoDB

CouchDB

Redis
Dynamo Distribution
BigCouch
Riak
Voldemort
Cassandra
    no vnodes
    no vector clocks
Hibari ?
Dynamo - how does it work?
                                                                                                           N=3
                                                                                                           W=2
                            Node 1

           26                                    No
      de                A   B   C    D             de
    No                                   B
                                                          2
                    C
                B                            C
     A                                                D
Z                                                             E

                                                                  C       N
                                                                           od
                                                                              e
                                                                      D           3

                                                                          E

                                                                                      F




                                                                                          D



                                                                                                  No
                                                                                                      de
                                                                                              E



                                                                                                       4
                                                                                                  F
                                                                                                      G
                                                                                                                 17
Dynamo - how does it work?
PUT http://boorad.cloudant.com/dbname/blah?w=2
                                                                                                              N=3
                                                                                                              W=2
                               Node 1

              26                                    No
         de                A   B   C    D             de
       No                                   B
                                                             2
                       C
                   B                            C
        A                                                D
   Z                                                             E

                                                                     C       N
                                                                              od
                                                                                 e
                                                                         D           3

                                                                             E

                                                                                         F




                                                                                             D



                                                                                                     No
                                                                                                         de
                                                                                                 E



                                                                                                          4
                                                                                                     F
                                                                                                         G
                                                                                                                    17
Dynamo - how does it work?
PUT http://boorad.cloudant.com/dbname/blah?w=2
                                                                                                              N=3
                                                                                                              W=2
                               Node 1

              26                                    No
         de                A   B   C    D             de
       No                                   B
                                                             2
                       C
                   B                            C
        A                                                D
   Z                                                             E

                                                                     C       N
                                                                              od
                                                                                 e
                                                                         D           3

                                                                             E

                                                                                         F




                                                                                             D



                                                                                                     No
                                                                                                         de
                                                                                                 E



                                                                                                          4
                                                                                                     F
                                                                                                         G
                                                                                                                    17
Dynamo - how does it work?
PUT http://boorad.cloudant.com/dbname/blah?w=2
                                                                                                                  N=3
                                                                                                                  W=2
                                 Node 1

              26                                        No
         de                A     B   C      D             de
       No                                       B
                                                                 2
                       C
                   B                                C
        A                                                    D
   Z                           hash(blah)                            E

                                                                         C       N
                                                                                  od
                                                                                     e
                                                                             D           3

                                                                                 E

                                                                                             F




                                                                                                 D



                                                                                                         No
                                                                                                             de
                                                                                                     E



                                                                                                              4
                                                                                                         F
                                                                                                             G
                                                                                                                        17
Dynamo - how does it work?
PUT http://boorad.cloudant.com/dbname/blah?w=2
                                                                                                                  N=3
                                                                                                                  W=2
                                 Node 1

              26                                        No
         de                A     B   C      D             de
       No                                       B
                                                                 2
                       C
                   B                                C
        A                                                    D
   Z                           hash(blah)                            E

                                                                         C       N
                                                                                  od
                                                                                     e
                                                                             D           3

                                                                                 E

                                                                                             F




                                                                                                 D



                                                                                                         No
                                                                                                             de
                                                                                                     E



                                                                                                              4
                                                                                                         F
                                                                                                             G
                                                                                                                        17
CAP Theorem
Pick Two (at any given time)

  Consistency

  Availability

  Partition Tolerance

CP refuses requests, AP eventually consistent

Must Read: http://codahale.com/you-cant-
sacrifice-partition-tolerance/
Data Model

Key/Value

Document

Column

Graph
Key / Value
BDB

Riak

Voldemort

Redis

Hibari
Document

CouchDB

MongoDB

SimpleDB
Column Stores

HBase

Cassandra

Hypertable
Graph Databases

Neo4J

AllegroGraph

FlockDB
Disk Data Structure

btree - many different kinds

mmap - compact bson

memtable/sstable or log structured merge tree

log-structured linear hashing

adjacency lists / adjacency matrices
Querying NoSQL
Key Lookups
 fast, easy, limiting
Secondary Indexes
 Immature part of most systems
 Roll your own
 MapReduce
Mongo query language
Polyglot Persistence

                                  RDBMS



                batch processes




                                          Cache
Raw
       Hadoop                     NoSQL           Apps
Data


                                  NoSQL
Drivers
Spring
  commons, hadoop, kv, document, graph
  membase, hbase, cassandra coming
Serialization
  Thrift, Protocol Buffers, Avro
Native
  Cassandra, Hadoop, Voldemort
  JInterface to Erlang?
Good Luck! You’ll Need It.
Questions?

More Related Content

PDF
PDF
Ball spline
PDF
La fiscalía y el gobierno están en mora de proteger a las víctimas en los cas...
PDF
Acordes piano
PDF
R Petrov Razorfish Project 1
PDF
Back Splash options
PDF
Thomson 368
PPTX
Greg Lollback_Variation in biomass estimation among replicated PPBio PTER plo...
Ball spline
La fiscalía y el gobierno están en mora de proteger a las víctimas en los cas...
Acordes piano
R Petrov Razorfish Project 1
Back Splash options
Thomson 368
Greg Lollback_Variation in biomass estimation among replicated PPBio PTER plo...

What's hot (9)

PPTX
Music presentation
PDF
Intelligent Tutorial System
PDF
Pmr trial-2010-math-qa-perak
PDF
Schematic driver edo
PDF
Leading Without Being In Charge
PDF
Img
PPSX
Portfolio Full Version
PDF
Finding%20 trigonometric%20ratios
PDF
State of the Cloud presentation from Interop 09 Enterprise Cloud Summit
Music presentation
Intelligent Tutorial System
Pmr trial-2010-math-qa-perak
Schematic driver edo
Leading Without Being In Charge
Img
Portfolio Full Version
Finding%20 trigonometric%20ratios
State of the Cloud presentation from Interop 09 Enterprise Cloud Summit
Ad

Viewers also liked (8)

PDF
Stream Processing in the Cloud With Data Microservices
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
PDF
Stay productive while slicing up the monolith
PDF
Architecting for failure - Why are distributed systems hard?
PPTX
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
PDF
Reactive Thinking in Java with RxJava2
PDF
Deploying Microservices as Containers
PPTX
Transformation Processing Smackdown; Spark vs Hive vs Pig
Stream Processing in the Cloud With Data Microservices
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
Stay productive while slicing up the monolith
Architecting for failure - Why are distributed systems hard?
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Reactive Thinking in Java with RxJava2
Deploying Microservices as Containers
Transformation Processing Smackdown; Spark vs Hive vs Pig
Ad

Similar to DevNexus 2011 (20)

PDF
Acordes piano
PDF
Acordes piano
PDF
Acordes piano
PDF
newtableconcept assembly instructions sheet
PDF
Brocade Migration Example
XLSX
Worked examples projects unit 1
PDF
Supplement Comparison chart
PDF
Folding Table Compact - Assembly Instructions Rev. 05
PDF
1362 1363 1352 1353 ball valve with elect and pneu actuator
PDF
Folding Table - Assembly Instructions Rev. 03
PPT
Sphyngolipid club 2006
PDF
Folding Table Standard - Assembly Instructions Rev. 05
PDF
L A S E R Sundial
PDF
Vim cheat-sheet-en
PDF
BLOCK (C.M.U.) EMBEDMENT PLATE PLACEMENT - WATER TREATMENT PLANT
PPTX
Periodic table
PDF
Gtr Show Special 2010
PPT
Pathways+presentation
PDF
The distillation process of cherry bourbon
PDF
Heartland Sundance 2013 Brochure
Acordes piano
Acordes piano
Acordes piano
newtableconcept assembly instructions sheet
Brocade Migration Example
Worked examples projects unit 1
Supplement Comparison chart
Folding Table Compact - Assembly Instructions Rev. 05
1362 1363 1352 1353 ball valve with elect and pneu actuator
Folding Table - Assembly Instructions Rev. 03
Sphyngolipid club 2006
Folding Table Standard - Assembly Instructions Rev. 05
L A S E R Sundial
Vim cheat-sheet-en
BLOCK (C.M.U.) EMBEDMENT PLATE PLACEMENT - WATER TREATMENT PLANT
Periodic table
Gtr Show Special 2010
Pathways+presentation
The distillation process of cherry bourbon
Heartland Sundance 2013 Brochure

More from boorad (12)

PPTX
Big Data Analysis Patterns with Hadoop, Mahout and Solr
PPTX
Big Data Analysis Patterns - TriHUG 6/27/2013
PPTX
Hadoop and Storm - AJUG talk
PDF
Realtime Computation with Storm
PPTX
Big Data Use Cases
PPTX
PhillyDB Talk - Beyond Batch
KEY
TriHUG - Beyond Batch
KEY
Realtime Computation with Storm
KEY
Large Scale Data Analysis Tools
KEY
DevNation Atlanta
KEY
NOSQL, CouchDB, and the Cloud
PDF
Why Erlang? - Bar Camp Atlanta 2008
Big Data Analysis Patterns with Hadoop, Mahout and Solr
Big Data Analysis Patterns - TriHUG 6/27/2013
Hadoop and Storm - AJUG talk
Realtime Computation with Storm
Big Data Use Cases
PhillyDB Talk - Beyond Batch
TriHUG - Beyond Batch
Realtime Computation with Storm
Large Scale Data Analysis Tools
DevNation Atlanta
NOSQL, CouchDB, and the Cloud
Why Erlang? - Bar Camp Atlanta 2008

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation theory and applications.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
MYSQL Presentation for SQL database connectivity
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 3 Spatial Domain Image Processing.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
sap open course for s4hana steps from ECC to s4
The Rise and Fall of 3GPP – Time for a Sabbatical?
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation theory and applications.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf

DevNexus 2011

Editor's Notes