1. What’s new in MongoDB 1.4
Mathias Stearn
10gen
NoSQL Live! Boston – March 11, 2010
Mathias Stearn What’s new in MongoDB 1.4
2. Concurrency
2D Geospatial Indexes
FindAndModify Command
Easier to work with Embedded Objects
Ops Friendliness
Concurrency
1 Writer – N Readers
Background Bulk Remove
Can also request atomic removal
Background Indexing
Mathias Stearn What’s new in MongoDB 1.4
3. Concurrency
2D Geospatial Indexes
FindAndModify Command
Easier to work with Embedded Objects
Ops Friendliness
2D Geospatial Indexes
db.people.find({loc: {$near: {x:-74, y:43}}});
{name: "Mathias", loc: {x:-74.5, y:43},
$distance=0.5}
{name: "Dwight", loc: {x:-73, y:43.7},
$distance=1.2}
{name: "Eliot", loc: {x:-75, y:44},
$distance=2}
Mathias Stearn What’s new in MongoDB 1.4
4. Concurrency
2D Geospatial Indexes
FindAndModify Command
Easier to work with Embedded Objects
Ops Friendliness
FindAndModify Command
db.jobs.findAndModify(
{ query: {in_progress: false}
, sort: {priority: -1}
, update: {$set: {in_progress: true}}
}
);
db.jobs.findAndModify( { remove: True });
Mathias Stearn What’s new in MongoDB 1.4
5. Concurrency
2D Geospatial Indexes
FindAndModify Command
Easier to work with Embedded Objects
Ops Friendliness
Easier to work with Embedded Objects
db.people.find(
{jobs: {$elemMatch: {name: "10gen"
,current: true}}}
);
db.posts.update(
{"comments.author": "mstearn"}}},
{$set: {"comments.$.author": "mathias"}}
);
Mathias Stearn What’s new in MongoDB 1.4
6. Concurrency
2D Geospatial Indexes
FindAndModify Command
Easier to work with Embedded Objects
Ops Friendliness
Ops Friendliness
Fsync-Lock Command
Flushes the buffers for snapshots
Slaves can be seeded with snapshots
Delayed slaves to prevent “oopses”
Drop-in replacement for 1.2
Mathias Stearn What’s new in MongoDB 1.4
7. Concurrency
2D Geospatial Indexes
FindAndModify Command
Easier to work with Embedded Objects
Ops Friendliness
Links
http://mongo.kylebanker.com (Try mongo in your browser)
http://www.mongodb.org
#mongodb on irc.freenode.net
mongodb-user on google groups
mathias@10gen.com
@mathias_mongo on twitter
Mathias Stearn What’s new in MongoDB 1.4