MongoDB Online Conference: Introducing MongoDB 2.2
 

Like this? Share it with your network

Share

MongoDB Online Conference: Introducing MongoDB 2.2

on

  • 3,534 views

 

Statistics

Views

Total Views
3,534
Views on SlideShare
3,408
Embed Views
126

Actions

Likes
12
Downloads
52
Comments
0

9 Embeds 126

http://www.emiliotorrens.com 56
http://www.10gen.com 45
https://twitter.com 10
http://www.linkedin.com 5
https://si0.twimg.com 4
https://twimg0-a.akamaihd.net 2
http://www.twylah.com 2
http://archive.10gen.com 1
http://www.pinterest.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Largest changes to in any release to date
  • Parallelism both i/o and cpuMongod processTwo new mechanisms
  • Yield on page faultWorks with a single collection kind of like record level locking. Very granularUse all I/O but not all cpuCommunity blog postTest is a single collection
  • Reader writer lock per databaseNo granularity to some granularity; more laterLocal database used by replication You can use multiple dbs if you need to
  • http://www.flickr.com/photos/22627146@N00/926962569/----- Meeting Notes (9/14/12 09:26) -----Add Grid Locked Intersection photo, blocking the box.
  • http://www.flickr.com/photos/22627146@N00/926962569/----- Meeting Notes (9/14/12 09:26) -----Add Grid Locked Intersection photo, blocking the box.
  • Try it and give us your feedback.Next: data center awareness and tag aware sharding.
  • What is it?NOT DRWhat do we want:Lowest latency possible for our usersPariton handlingNeed:Multiple data centers taking writes
  • I started a siteSimple photo sharingI upload pictures, send linksI can tag, secure, etc…I want my writes to be fast and my reads to be consistentOther people’s reads can be slightly inconsistent
  • my 2.0 setupAll writes have to hit NYMy reads go to NYOther reads can go eitherWhat do I want to do: - make “my stuff” fast - make “other stuff” fast
  • Administrators can use simple rules to make mongo put data in the most intelligent place
  • Shard1’s primary move dto SFO2 nodes in the primary, 1 on secondary
  • Now for users in LA, things are much betterTokyo is a little better, but not much
  • Shard1’s primary move dto SFO2 nodes in the primary, 1 on secondary
  • Now for users in LA, things are much betterTokyo is a little better, but not much
  • Mongos routes to closest
  • Mongos routes to closest
  • Well, unless you are traveling, nothing
  • Shard by timeCan move older data to slower machinesNew data can be on SSDs, etc..
  • Education 10gen screenshot homepage
  • M101 : MongoDB for Developers
  • M102 : MongoDB for DBAs
  • Edx.org

MongoDB Online Conference: Introducing MongoDB 2.2 Presentation Transcript

  • 1. What’s 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 Framework Map/Reduce Framework Hadoop Connector
  • 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 clause select clause pivot an array group by clause having 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 clause select clause pivot an array group by clause having clause order 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 and useful", {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 ea dp "status: "active", postCnt: {$sum : 1}, "authors" : [post:"this is phenomenal and viewCnt: {$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 clause pivot an array group by clause having clause order by clause top clause
  • 8. Separable WorkloadOperational Workload Analytical Workload for users for 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 Awareness Eliot Horowitz, CTO & Co-Founder, 10gen
  • 17. myphotos.com
  • 18. 2.0 Setup NYC SFOShard1 Primary SecondaryShard2 Primary Secondary My Writes My Reads Boston 8ms 8ms Chicago 23ms 23ms Los Angeles 83ms 83ms Paris 133ms 133ms Tokyo 174ms 174ms
  • 19. Tag Aware Sharding{ country : “USA” , region : “CA” , picture_id : 12345}
  • 20. 2.2 Setup SFO NYC TagShard1 Primary Secondary SFOShard2 Secondary Primary NYC country region tag USA CA SFO USA FL NYC USA CA SFO
  • 21. My Writes My ReadsBoston 8ms 8msChicago 23ms 23msLos Angeles 10ms 10msParis 133ms 133msTokyo 95ms 95ms
  • 22. 2.2 Setup SFO NYC Amsterdam Tokyo TagShard1 Primary Secondary SFOShard2 Secondary Primary NYCShard3 Secondary Primary EMEAShard4 Secondary Primary JAPAN country region tag USA CA SFO USA FL NYC USA CA SFO FRANCE EMEA CHINA JAPAN
  • 23. My Writes My ReadsBoston 8ms 8msChicago 23ms 23msLos Angeles 10ms 10msParis 10ms 10msTokyo 5ms 5ms
  • 24. My Writes My Reads Other ReadsBoston 8ms 8ms 8msChicago 23ms 23ms 23msLos Angeles 10ms 10ms 10msParis 10ms 10ms 10msTokyo 5ms 5ms 5ms
  • 25. My Writes My Reads Other ReadsBoston 8ms 8ms 8msChicago 23ms 23ms 23msLos Angeles 10ms 10ms 10msParis 10ms 10ms 10msTokyo 5ms 5ms 5ms
  • 26. Archival
  • 27. TTL Collections Andrew Erlichson, VP of Education, 10gen
  • 28. Motivation Caching
  • 29. Motivation Caching Operational Logging
  • 30. Motivation Caching Operational LoggingLogin 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”: 1 “expireAfterSeconds”: 900})
  • 35. FREE OnlineMongoDB Classes education.10gen.com
  • 36. Closing Remarks and Q&A Eliot Horowitz, CTO & Co-Founder, 10gen