Slide 1

Slide 1 text

MongoDB 2.2 Release update + Roadmap Alvin Richards Technical Director, EMEA [email protected] @jonnyeight alvinonmongodb.com

Slide 2

Slide 2 text

Recent Release History 2.2 Aug ‘12 2.4 winter ‘12 2.0 Sept ‘11 1.8 March ‘11 Journaling Sharding and Replica set enhancements Spherical geo search Index enhancements to improve size and performance Authentication with sharded clusters Replica Set Enhancements Concurrency improvements Aggregation Framework Multi-Data Center Deployments Improved Performance and Concurrency

Slide 3

Slide 3 text

• Concurrency: yielding + db level locking • New aggregation framework • TTL Collections • Improved free list implementation • Tag aware sharding • Read Preferences • http://docs.mongodb.org/manual/release-notes/2.2/ 2.2 Release August 2012

Slide 4

Slide 4 text

Yielding + DB Locking • improved yielding on page fault • breaking down the global level lock • Lock per Database in 2.2 • Lock per Collection post 2.2

Slide 5

Slide 5 text

Aggregation Framework • pipeline model (a bit like unix pipes) • like a "group by" – Operators –$project, $group, $match, $limit, $skip, $unwind, $sort – Expressions –Logical Expressions: $and, $not, $or, $cmp ... –Math Expressions: $add, $divide, $mod ... –String Expressions: $strcasecmp, $substr, $toLower ... –Date/Time Expressions: $dayOfMonth, $hour... –Multi-Expressions: $ifNull, $cond • Use Cases: Real-time / inline analytics

Slide 6

Slide 6 text

Aggregate Command db.blogs.aggregate( { $project : { author : 1, tags : 1, } }, { $unwind : "$tags" }, { $group : { _id : { tags : "$tags" }, authors : { $addToSet : "$author" } } } );

Slide 7

Slide 7 text

Time To Live (TTL) Collections • auto expire data out of a collection • must be on a date datatype • single value is evaluated • Use Cases: data retention, cache expiration db.events.ensureIndex( { "timestamp": 1 }, { expireAfterSeconds: 3600 } )

Slide 8

Slide 8 text

Tag aware sharding • Distribute data based on a Tag • Use Cases: Locality for Data by Data Center sh.addShardTag("shard0000", "dc-emea") sh.addTagRange("mydb.users", { country: "uk"}, { country: "ul"}, "dc-emea" ); sh.addTagRange("mydb.users", { country: "by"},{ country: "bz"}, "dc-emea" );

Slide 9

Slide 9 text

Read Preferences • Mode • PRIMARY, PRIMARY_PREFERRED • SECONDARY, SECONDARY_PREFERRED • NEAREST • Tag Sets • Uses Replica Set tags • Passed Tag is used to find matching members