25
Lean and mean MongoDB or why MongoDB is good for start ups

Lean and mean MongoDB

Embed Size (px)

DESCRIPTION

Why MongoDB is a good fit for startups.

Citation preview

Page 1: Lean and mean MongoDB

Lean and mean MongoDBor why MongoDB is good for start ups

Page 2: Lean and mean MongoDB

/whois olegp

Page 3: Lean and mean MongoDB
Page 4: Lean and mean MongoDB

/whois olegp

● doing startups since 2000– RIOT-E

● tech DD for investors since 2008 ● Startup Sauna coach● new venture: StartHQ

Page 5: Lean and mean MongoDB

Web apps 101

Page 6: Lean and mean MongoDB
Page 7: Lean and mean MongoDB

Web apps 101

● REST API centric design● One primary data store

– Except blobs

● No premature optimization– e.g. caching

Page 8: Lean and mean MongoDB

The Contenders

Page 9: Lean and mean MongoDB
Page 10: Lean and mean MongoDB

Background Reading

● “How FriendFeed uses MySQL to store schemaless data”– “mariadb dynamic columns”

● “PostgreSQL as a schemaless database”

Page 11: Lean and mean MongoDB

The Pros

Page 12: Lean and mean MongoDB
Page 13: Lean and mean MongoDB

The Pros

● Simpler schema design– Fewer many to one relationships

– Design is part of development, not separate

● No DB setup step● No DB migrations *● No ORMs● JSON as query language

Page 14: Lean and mean MongoDB
Page 15: Lean and mean MongoDB

Hosting

● Amazon RDS: from $18 ● Heroku Postgres: from $10● MongoHQ & MongoLab: from FREE

Page 16: Lean and mean MongoDB

Database as a Service

Page 17: Lean and mean MongoDB
Page 18: Lean and mean MongoDB

Database as a Service

● Web admin FTW– Saves you building your own

● No SSL– But on AWS you can't sniff traffic

● Expensive backups– But you can easily roll your own

Page 19: Lean and mean MongoDB

Some Code

return db.getCollection("apps").find({ nameLowerCase:{ $regex:utils.prettify(request.queryParams.term) }, verified:true }, { name:true, url:true }).sort({'extractors.social.score':-1}) .limit(10).toArray().map(function(app) { return { label:app.name, value:app.url }; });

Page 20: Lean and mean MongoDB

Tools

● 10gen MMS● Metrica● Nodetime

Page 21: Lean and mean MongoDB

Getting Started

Page 22: Lean and mean MongoDB
Page 23: Lean and mean MongoDB

Getting Started

● try.mongodb.org● “dailyjs lmaw”● olegp/notes & olegp/tokenize

Page 24: Lean and mean MongoDB

Summary

● Optimize for ease of development● Do design your schema● Do not prematurely optimize● Have fun!

Page 25: Lean and mean MongoDB

Thanks!

@olegpodsechin

starthq.com/apps/?q=mongodb