What’s new inMongoDB Version 2.220 September 2012                    # m o n g od b2do t2
Intro & WelcomeDwight Merriman, CEO & Co-Founder, 10gen
The Aggregation           FrameworkEdouard Servan-Schreiber, Ph.D, Director of Solutions Architecture, 10gen
Analytic Options Aggregation Framework  Map/Reduce  Framework  Hadoop  Connector
Operators{                                                                   SELECT author,_id: …..                       ...
Operators{                                                                         "result" : [_id: …..                   ...
Operators{                                                      db.agg_test.aggregate(                                    ...
Separable WorkloadOperational Workload   Analytical Workload      for users            for business
ConcurrencyDwight Merriman, CEO & Co-Founder, 10gen
Yield-on-page fault.(“PageFaultException”)
Lock perdatabase
Replication and Secondaries
Monitoring and Diagnostics• db.currentOp()• db.serverStatus()• mongostat• mongotop --locks• MMS (Mongo Monitoring Service)
MMS
MMS
Data Center Awareness    Eliot Horowitz, CTO & Co-Founder, 10gen
myphotos.com
2.0 Setup                       NYC             SFOShard1                 Primary         SecondaryShard2                 ...
Tag Aware Sharding{    country : “USA” ,    region : “CA” ,    picture_id : 12345}
2.2 Setup               SFO                NYC             TagShard1         Primary            Secondary       SFOShard2 ...
My Writes   My ReadsBoston        8ms         8msChicago       23ms        23msLos Angeles   10ms        10msParis        ...
2.2 Setup         SFO         NYC            Amsterdam         Tokyo     TagShard1   Primary     Secondary                ...
My Writes   My ReadsBoston        8ms         8msChicago       23ms        23msLos Angeles   10ms        10msParis        ...
My Writes   My Reads   Other ReadsBoston        8ms         8ms        8msChicago       23ms        23ms       23msLos Ang...
My Writes   My Reads   Other ReadsBoston        8ms         8ms        8msChicago       23ms        23ms       23msLos Ang...
Archival
TTL Collections Andrew Erlichson, VP of Education, 10gen
Motivation  Caching
Motivation  Caching Operational  Logging
Motivation   Caching Operational  LoggingLogin Sessions
Capped Collections
IntroducingTTL Collections(Time To Live)
Example of a TTL collection{    _id: ObjectID(“62x4lad7za2”),    username: “joe”,    session_id: “x3490dfds383”,    last_a...
Making a collection TTLdb.sessions.ensureIndex({“last_activity”: 1                      “expireAfterSeconds”: 900})
FREE OnlineMongoDB Classes education.10gen.com
Closing Remarks    and Q&A Eliot Horowitz, CTO & Co-Founder, 10gen
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
MongoDB Online Conference: Introducing MongoDB 2.2
Upcoming SlideShare
Loading in...5
×

MongoDB Online Conference: Introducing MongoDB 2.2

3,055

Published on

Published in: Technology, Business
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,055
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
53
Comments
0
Likes
12
Embeds 0
No embeds

No notes for slide
  • 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

    1. 1. What’s new inMongoDB Version 2.220 September 2012 # m o n g od b2do t2
    2. 2. Intro & WelcomeDwight Merriman, CEO & Co-Founder, 10gen
    3. 3. The Aggregation FrameworkEdouard Servan-Schreiber, Ph.D, Director of Solutions Architecture, 10gen
    4. 4. Analytic Options Aggregation Framework Map/Reduce Framework Hadoop Connector
    5. 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. 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. 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. 8. Separable WorkloadOperational Workload Analytical Workload for users for business
    9. 9. ConcurrencyDwight Merriman, CEO & Co-Founder, 10gen
    10. 10. Yield-on-page fault.(“PageFaultException”)
    11. 11. Lock perdatabase
    12. 12. Replication and Secondaries
    13. 13. Monitoring and Diagnostics• db.currentOp()• db.serverStatus()• mongostat• mongotop --locks• MMS (Mongo Monitoring Service)
    14. 14. MMS
    15. 15. MMS
    16. 16. Data Center Awareness Eliot Horowitz, CTO & Co-Founder, 10gen
    17. 17. myphotos.com
    18. 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. 19. Tag Aware Sharding{ country : “USA” , region : “CA” , picture_id : 12345}
    20. 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. 21. My Writes My ReadsBoston 8ms 8msChicago 23ms 23msLos Angeles 10ms 10msParis 133ms 133msTokyo 95ms 95ms
    22. 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. 23. My Writes My ReadsBoston 8ms 8msChicago 23ms 23msLos Angeles 10ms 10msParis 10ms 10msTokyo 5ms 5ms
    24. 24. My Writes My Reads Other ReadsBoston 8ms 8ms 8msChicago 23ms 23ms 23msLos Angeles 10ms 10ms 10msParis 10ms 10ms 10msTokyo 5ms 5ms 5ms
    25. 25. My Writes My Reads Other ReadsBoston 8ms 8ms 8msChicago 23ms 23ms 23msLos Angeles 10ms 10ms 10msParis 10ms 10ms 10msTokyo 5ms 5ms 5ms
    26. 26. Archival
    27. 27. TTL Collections Andrew Erlichson, VP of Education, 10gen
    28. 28. Motivation Caching
    29. 29. Motivation Caching Operational Logging
    30. 30. Motivation Caching Operational LoggingLogin Sessions
    31. 31. Capped Collections
    32. 32. IntroducingTTL Collections(Time To Live)
    33. 33. Example of a TTL collection{ _id: ObjectID(“62x4lad7za2”), username: “joe”, session_id: “x3490dfds383”, last_activity: ISODate(“2012-09-20T05:23:23”)}
    34. 34. Making a collection TTLdb.sessions.ensureIndex({“last_activity”: 1 “expireAfterSeconds”: 900})
    35. 35. FREE OnlineMongoDB Classes education.10gen.com
    36. 36. Closing Remarks and Q&A Eliot Horowitz, CTO & Co-Founder, 10gen
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×