mongodb online conference: introducing mongodb 2.2

48
#mongodb2dot2 What’s new in MongoDB Version 2.2 20 September 2012

Upload: mongodb

Post on 03-Dec-2014

3.599 views

Category:

Technology


3 download

DESCRIPTION

 

TRANSCRIPT

  • 1. Whats new inMongoDB Version 2.220 September 2012# m o n g od b2do t2

2. Intro & WelcomeDwight Merriman, CEO & Co-Founder, 10gen 3. The Aggregation FrameworkEdouard Servan-Schreiber, Ph.D, Director of Solutions Architecture, 10gen 4. Analytic Options Aggregation FrameworkMap/ReduceFrameworkHadoopConnector 5. Operators{ SELECT author,_id: .. count(*) as postCnt,author: "edouard", sum(views) as viewCntstatus: "active", FROM ..post:"this is brilliant and wise and useful", GROUP BY authortags:["brilliant", "wise", "useful"],views: 10}db.agg_test.aggregate({$group :{{_id: "$author",_id: .. postCnt: {$sum : 1},author: "ron", viewCnt: {$sum: "$views"}status: "active",}post:"this is phenomenal and useful", }tags:["phenomenal", "useful"],)views: 15} $match $project $unwind$group$match $sort$limit where clauseselect clausepivot an array group by clausehaving clause order by clause top clause 6. Operators{ "result" : [_id: ..{author: "edouard","_id" : "useful",status: "active", "authors" : [post:"this is brilliant and wise and useful","ron",tags:["brilliant", "wise", "useful"],"edouard"views: 10 ],} "postCnt" : 2,"viewCnt" : 25 },{{_id:.. "_id" : "phenomenal",author: "ron","authors" : [status: "active","ron"post:"this is phenomenal and useful", ],tags:["phenomenal", "useful"],"postCnt" : 1,views: 15 "viewCnt" : 15}}],"ok" : 1 } $match $project $unwind$group $match $sort$limit where clauseselect clausepivot an array group by clausehaving clauseorder by clause top clause 7. Operators{db.agg_test.aggregate( {_id: .."result" : [author: "edouard", {$match: {status: "active"}}, {status: "active",{$project : "_id" : "useful",post:"this is brilliant and wise anduseful",{author: 1,"authors" : [tags:["brilliant", "wise", "useful"], tags: 1, "ron",views: 10 views : 1"edouard"} }], },"postCnt" : 2, {$unwind : "$tags"},"viewCnt" : 25{{$group : },_id:.. {_id: "$tags", {author: "ron",authors: { $addToSet: "$author"},"i"hnmnl, _: eo eadp"status: "active", postCnt: {$sum : 1}, "authors" : [post:"this is phenomenal andviewCnt: {$sum: "$views"}"ron"useful",}],tags:["phenomenal", "useful"], },"postCnt" : 1,views: 15{$match : {viewCnt : {$gte: 10}}},"viewCnt" : 15}{$sort: {viewCnt : -1}},} {$limit: 2}],"ok" : 1 )} $match $project $unwind $group $match $sort $limit where clause select clausepivot an arraygroup by clausehaving clause order by clausetop clause 8. Separable WorkloadOperational Workload Analytical Workloadfor usersfor business 9. ConcurrencyDwight Merriman, CEO & Co-Founder, 10gen 10. Yield-on-page fault.(PageFaultException) 11. Lock perdatabase 12. Replication and Secondaries 13. Monitoring and Diagnostics db.currentOp() db.serverStatus() mongostat mongotop --locks MMS (Mongo Monitoring Service) 14. MMS 15. MMS 16. Data Center AwarenessEliot Horowitz, CTO & Co-Founder, 10gen 17. myphotos.com 18. 2.0 Setup NYC SFOShard1 Primary SecondaryShard2 Primary Secondary My Writes My Reads Boston8ms 8ms Chicago 23ms23ms Los Angeles 83ms83ms Paris 133ms 133ms Tokyo 174ms 174ms 19. Tag Aware Sharding{country : USA ,region : CA ,picture_id : 12345} 20. 2.2 Setup SFONYC TagShard1 PrimarySecondary SFOShard2 SecondaryPrimary NYC country region tag USA CA SFO USA FL NYC USA CA SFO 21. My Writes My ReadsBoston8ms 8msChicago 23ms23msLos Angeles 10ms10msParis 133ms 133msTokyo 95ms95ms 22. 2.2 Setup SFO NYCAmsterdam Tokyo TagShard1 Primary SecondarySFOShard2 Secondary PrimaryNYCShard3 SecondaryPrimary EMEAShard4 SecondaryPrimary JAPANcountryregion tagUSACA SFOUSAFL NYCUSACA SFOFRANCEEMEACHINA JAPAN 23. My Writes My ReadsBoston8ms 8msChicago 23ms23msLos Angeles 10ms10msParis 10ms10msTokyo 5ms 5ms 24. My Writes My Reads Other ReadsBoston8ms 8ms8msChicago 23ms23ms 23msLos Angeles 10ms10ms 10msParis 10ms10ms 10msTokyo 5ms 5ms5ms 25. My Writes My Reads Other ReadsBoston8ms 8ms8msChicago 23ms23ms 23msLos Angeles 10ms10ms 10msParis 10ms10ms 10msTokyo 5ms 5ms5ms 26. Archival 27. TTL Collections Andrew Erlichson, VP of Education, 10gen 28. MotivationCaching 29. MotivationCaching OperationalLogging 30. Motivation Caching OperationalLoggingLogin Sessions 31. Capped Collections 32. IntroducingTTL Collections(Time To Live) 33. Example of a TTL collection{_id: ObjectID(62x4lad7za2),username: joe,session_id: x3490dfds383,last_activity: ISODate(2012-09-20T05:23:23)} 34. Making a collection TTLdb.sessions.ensureIndex({last_activity: 1expireAfterSeconds: 900}) 35. FREE OnlineMongoDB Classes education.10gen.com 36. Closing Remarksand Q&A Eliot Horowitz, CTO & Co-Founder, 10gen