document-oriented database. • Fast Querying & In-place updates • Full Index Support • Replication & High Availability • Auto-Sharding • Aggregation & Map/Reduce • GridFS
• Platforms 32/64 bit Windows, Linux, Mac OS-X, FreeBSD, Solaris Drivers are available in many languages 10gen supported • C, C# (.Net), C++, Erlang, Haskell, Java, JavaScript, Perl, PHP, Python, Ruby, Scala, nodejs Community supported • Clojure, ColdFusion, F#, Go, Groovy, Lua, R ... http://www.mongodb.org/display/DOCS/Drivers
• Mongo extends dataypes with Date, Int types, Id, … • MongoDB stores data in BSON • BSON is a binary representation of JSON • Optimized for performance and navigational abilities • Also compression See: bsonspec.org
• Super low latency access to your data • Very little CPU overhead • No additional caching layer required • Built in replication and horizontal scaling support
find other locations nearby" • Need to store locations (Offices, Restaurants, etc) • name, address, tags • coordinates • User generated content e.g. tips / notes
'checkin' to a location" Checkins • User should be able to 'check in' to a location • Want to be able to generate statistics: • Recent checkins • Popular locations
'checkin' to a location" Checkins • User should be able to 'check in' to a location • Want to be able to generate statistics: • Recent checkins • Popular locations
Tai Fung"}) // find the last 10 checkins here: - Warning! > db.users.find({"checkins.location":"Din Tai Fung"}) .sort({"checkins.ts": -1}).limit(10) Simple Stats
Tai Fung"}) // find the last 10 checkins here: - Warning! > db.users.find({"checkins.location":"Din Tai Fung"}) .sort({"checkins.ts": -1}).limit(10) Simple Stats