why nosql makes sense

18
Why NoSQL Makes Sense and when to use something else? Dwight Merriman / 10gen / MongoDB

Upload: mongodb

Post on 17-Jun-2015

923 views

Category:

Technology


3 download

DESCRIPTION

Dwight Merriman's keynote at

TRANSCRIPT

Page 1: Why NoSQL Makes Sense

Why NoSQL Makes Sense

and when to use something else?

Dwight Merriman / 10gen / MongoDB

Page 2: Why NoSQL Makes Sense

The Scaling Imperative

It already was needed but now...

Page 3: Why NoSQL Makes Sense

http://www.globalnerdy.com/2007/09/07/multicore-musings/

cloud

commodity

Page 4: Why NoSQL Makes Sense

NoSQL = Non-relational next generation operation data stores

and databases

no joins +light transactional semantics = horizontally scalable architectures

Page 5: Why NoSQL Makes Sense

Scaling Out

distribution & query models

Consistent hashing

Order preserving range chunking

Scatter gather

Page 6: Why NoSQL Makes Sense

Data models

no joins +light transactional semantics = horizontally scalable architectures

Important side effect : new data models = improved ways to develop apps (“Agility”)

Page 7: Why NoSQL Makes Sense
Page 8: Why NoSQL Makes Sense

{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”

}

Page 9: Why NoSQL Makes Sense

{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”]

}

> db.posts.find( { tags : “news” } )

Page 10: Why NoSQL Makes Sense

{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”],votes : 3,voters : [“dmerr”, “sj”, “jane” ]

}

Page 11: Why NoSQL Makes Sense

{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”],votes : 3,voters : [“dmerr”, “sj”, “jane” ],comments : [

{ by : “tim157”, text : “great story” },{ by : “gora”, text : “i don’t think so” },{ by : “dmerr”, text : “also check out...” }

]}

Page 12: Why NoSQL Makes Sense

{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”],votes : 3,voters : [“dmerr”, “sj”, “jane” ],comments : [

{ by : “tim157”, text : “great story” },{ by : “gora”, text : “i don’t think so” },{ by : “dmerr”, text : “also check out...” }

]}

> db.posts.find({title:”Too Big to Fail”})

`

Page 13: Why NoSQL Makes Sense

{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”],votes : 3,voters : [“dmerr”, “sj”, “jane” ],comments : [

{ by : “tim157”, text : “great story” },{ by : “gora”, text : “i don’t think so” },{ by : “dmerr”, text : “also check out...” }

]}

> db.posts.find( { “comments.by” : “gora” } )> db.posts.ensureIndex( { “comments.by” : 1 } )

Page 14: Why NoSQL Makes Sense

the db space 2000 - 2010

OLTP / operational

BI / reporting

+ great for complex transactions+ great for tabular data+ ad hoc queries easy- O<->R mapping hard- speed/scale challenges- not super agile

+ ad hoc queries easy+ SQL gives us a standard protocol for the interface between clients and servers+ scales horizontally better than operational dbs. some scale limits at massive scale- schemas are rigid- real time is hard; very good at bulk nightly data loads

Page 15: Why NoSQL Makes Sense

the db space 2000 - 2010

OLTP / operational

BI / reporting

+ great for complex transactions+ great for tabular data+ ad hoc queries easy- O<->R mapping hard- speed/scale challenges- not super agile

+ ad hoc queries easy+ SQL gives us a standard protocol for the interface between clients and servers+ scales horizontally better than operational dbs. some scale limits at massive scale- schemas are rigid- real time is hard; very good at bulk nightly data loads

less issues here

Page 16: Why NoSQL Makes Sense

the db space 2000 - 2010

OLTP / operational

BI / reporting

+ great for complex transactions+ great for tabular data+ ad hoc queries easy- O<->R mapping hard- speed/scale challenges- not super agile

+ ad hoc queries easy+ SQL gives us a standard protocol for the interface between clients and servers+ scales horizontally better than operational dbs. some scale limits at massive scale- schemas are rigid- real time is hard; very good at bulk nightly data loads

caching

flat filesmap/reduce

app layer partitioning

Page 17: Why NoSQL Makes Sense

the db space

scalable nonrelational

(“nosql”)

OLTP / operational

BI / reporting

+ fits OO programming well+ agile+ speed/scale- querying a little less add hoc- not super transactional- not sql

Page 18: Why NoSQL Makes Sense

Thanks

Dwight MerrimanCEO 10gen

http://blog.mongodb.org/@mongodb

me - @[email protected]

www.mongodb.orgwww.mongodb.org/display/DOCS/Events