databases and agile development - dwight merriman (mongodb)

16

Click here to load reader

Upload: jaxlondonconference

Post on 12-May-2015

985 views

Category:

Technology


0 download

DESCRIPTION

Presented as a keynote at JAX London 2013 Much has been made of scalability as a driver for choosing a database, but the choice of a database influences much more than the scaling architecture. Different database choices drive different data models which in turn influence the development process.

TRANSCRIPT

Page 1: Databases and agile development - Dwight Merriman (MongoDB)

Databases and Agile Development

Dwight MerrimanMongoDB

Page 2: Databases and agile development - Dwight Merriman (MongoDB)

•What is the first thing you think of when you hear “RDBMS”?

•What is the first thing you think of when you hear “SQL”?

•What is the first thing you think of when you hear “NoSQL”?

Page 3: Databases and agile development - Dwight Merriman (MongoDB)

New data models create an opportunity to innovate

Page 4: Databases and agile development - Dwight Merriman (MongoDB)

Dynamic schemas

Facilitate agile

But there is a schema!

It evolves some of course

Page 5: Databases and agile development - Dwight Merriman (MongoDB)

{ _id : “too_big_to_fail”, title : “Too Big to Fail”, author : “joe123”, when : “2008-12-03”, body_text : “…”,}

Page 6: Databases and agile development - Dwight Merriman (MongoDB)

{ _id : “too_big_to_fail”, title : “Too Big to Fail”, author : “joe123”, when : “2008-12-03”, body_text : “…”, comments : [ { who:”jane”, comment:”I don’t think so…”, when:”2008-12-04” }, … ]}

Page 7: Databases and agile development - Dwight Merriman (MongoDB)

{ _id : “too_big_to_fail”, title : “Too Big to Fail”, author : “joe123”, when : “2008-12-03”, body_text : “…”, comments : [ { who:”jane”, comment:”I don’t think so…”, when:”2008-12-04” }, … ]}

db.posts.find( { “who”:”jane” } )

Page 8: Databases and agile development - Dwight Merriman (MongoDB)

{ _id : “too_big_to_fail”, title : “Too Big to Fail”, author : “joe123”, when : “2008-12-03”, body_text : “…”, comments : [ { who:”jane”, comment:”I don’t think so…”, when:”2008-12-04” }, … ], votes : 3, voters : [‘joe123’,’kblm’,’dwight’]}

Page 9: Databases and agile development - Dwight Merriman (MongoDB)

{ _id : “too_big_to_fail”, title : “Too Big to Fail”, author : “joe123”, when : “2008-12-03”, body_text : “…”, comments : [ { who:”jane”, comment:”I don’t think so…”, when:”2008-12-04” }, … ], votes : 3, voters : [‘joe123’,’kblm’,’dwight’]}

db.posts.update( {_id:“too_big_to_fail” , voters:{$ne:”jjelm”}}, {$inc:{votes:1}, $push:{voters:”jjelm”} })

Page 10: Databases and agile development - Dwight Merriman (MongoDB)

Static vs Dynamic

int x = “abc”; // javavar x = “abc”; // javascript

Page 11: Databases and agile development - Dwight Merriman (MongoDB)

Static vs Dynamic

int x = “abc”; // javavar x = “abc”; // javascript

UPDATE items SET x = “abc”

Page 12: Databases and agile development - Dwight Merriman (MongoDB)

SOA & Agile

A

B

C

D

{ x : 3, desc : “thing”}

Page 13: Databases and agile development - Dwight Merriman (MongoDB)

SOA & Agile

A

B

C

D

{ x : 3, desc : “thing”, loc : [20.3, 24.732]}

Page 14: Databases and agile development - Dwight Merriman (MongoDB)

Further thoughts on writing apps today

Store first, ask questions later“speculative storage”

Page 15: Databases and agile development - Dwight Merriman (MongoDB)

Further thoughts on writing apps today

Default to real-time

Page 16: Databases and agile development - Dwight Merriman (MongoDB)

Thanks