SlideShare ist ein Scribd-Unternehmen logo
1 von 48
What’s new in
MongoDB Version 2.2
20 September 2012




                    # m o n g od b2do t2
Intro & Welcome
Dwight Merriman, CEO & Co-Founder, 10gen
The Aggregation
           Framework
Edouard Servan-Schreiber, Ph.D, Director of Solutions Architecture, 10gen
Analytic Options



 Aggregation
 Framework


  Map/Reduce
  Framework



  Hadoop
  Connector
Operators
{                                                                   SELECT author,
_id: …..                                                                 count(*) as postCnt,
author: "edouard",                                                       sum(views) as viewCnt
status: "active",                                                   FROM …..
post:"this is brilliant and wise and useful",                       GROUP BY author
tags:["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
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
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
Separable Workload




Operational Workload   Analytical Workload
      for users            for business
Concurrency
Dwight Merriman, CEO & Co-Founder, 10gen
Yield-on-page fault.
(“PageFaultException”)
Lock per
database
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             SFO
Shard1                 Primary         Secondary
Shard2                 Primary         Secondary



                         My Writes   My Reads
         Boston          8ms         8ms

         Chicago         23ms        23ms

         Los Angeles     83ms        83ms

         Paris           133ms       133ms

         Tokyo           174ms       174ms
Tag Aware Sharding




{
    country : “USA” ,
    region : “CA” ,
    picture_id : 12345
}
2.2 Setup


               SFO                NYC             Tag
Shard1         Primary            Secondary       SFO
Shard2         Secondary          Primary         NYC



         country         region             tag
         USA             CA                 SFO
         USA             FL                 NYC
         USA             CA                 SFO
My Writes   My Reads
Boston        8ms         8ms

Chicago       23ms        23ms

Los Angeles   10ms        10ms

Paris         133ms       133ms

Tokyo         95ms        95ms
2.2 Setup


         SFO         NYC            Amsterdam         Tokyo     Tag
Shard1   Primary     Secondary                                  SFO
Shard2   Secondary   Primary                                    NYC
Shard3               Secondary      Primary                     EMEA
Shard4   Secondary                                    Primary   JAPAN


          country          region             tag
          USA              CA                 SFO
          USA              FL                 NYC
          USA              CA                 SFO
          FRANCE                              EMEA
          CHINA                               JAPAN
My Writes   My Reads
Boston        8ms         8ms

Chicago       23ms        23ms

Los Angeles   10ms        10ms

Paris         10ms        10ms

Tokyo         5ms         5ms
My Writes   My Reads   Other Reads
Boston        8ms         8ms        8ms

Chicago       23ms        23ms       23ms

Los Angeles   10ms        10ms       10ms

Paris         10ms        10ms       10ms

Tokyo         5ms         5ms        5ms
My Writes   My Reads   Other Reads
Boston        8ms         8ms        8ms

Chicago       23ms        23ms       23ms

Los Angeles   10ms        10ms       10ms

Paris         10ms        10ms       10ms

Tokyo         5ms         5ms        5ms
Archival
TTL Collections
 Andrew Erlichson, VP of Education, 10gen
Motivation


  Caching
Motivation


  Caching



 Operational
  Logging
Motivation


   Caching



 Operational
  Logging



Login Sessions
Capped Collections
Introducing
TTL Collections
(Time To Live)
Example of a TTL collection




{
    _id: ObjectID(“62x4lad7za2”),
    username: “joe”,
    session_id: “x3490dfds383”,
    last_activity: ISODate(“2012-09-20T05:23:23”)
}
Making a collection TTL




db.sessions.ensureIndex({“last_activity”: 1
                      “expireAfterSeconds”: 900})
FREE Online
MongoDB Classes

 education.10gen.com
Closing Remarks
    and Q&A
 Eliot Horowitz, CTO & Co-Founder, 10gen

Weitere ähnliche Inhalte

Was ist angesagt?

Debugging Ruby (Aman Gupta)
Debugging Ruby (Aman Gupta)Debugging Ruby (Aman Gupta)
Debugging Ruby (Aman Gupta)
MongoSF
 
MongoDB全機能解説2
MongoDB全機能解説2MongoDB全機能解説2
MongoDB全機能解説2
Takahiro Inoue
 
Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)
MongoSF
 
kissy-past-now-future
kissy-past-now-futurekissy-past-now-future
kissy-past-now-future
yiming he
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
Takahiro Inoue
 
Easy undo.key
Easy undo.keyEasy undo.key
Easy undo.key
zachwaugh
 
What istheservicestack
What istheservicestackWhat istheservicestack
What istheservicestack
Demis Bellot
 

Was ist angesagt? (18)

Spine JS
Spine JSSpine JS
Spine JS
 
MongoDB .local Munich 2019: Tips and Tricks++ for Querying and Indexing MongoDB
MongoDB .local Munich 2019: Tips and Tricks++ for Querying and Indexing MongoDBMongoDB .local Munich 2019: Tips and Tricks++ for Querying and Indexing MongoDB
MongoDB .local Munich 2019: Tips and Tricks++ for Querying and Indexing MongoDB
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance Tuning
 
Debugging Ruby (Aman Gupta)
Debugging Ruby (Aman Gupta)Debugging Ruby (Aman Gupta)
Debugging Ruby (Aman Gupta)
 
Thoughts on MongoDB Analytics
Thoughts on MongoDB AnalyticsThoughts on MongoDB Analytics
Thoughts on MongoDB Analytics
 
MongoDB .local London 2019: Tips and Tricks++ for Querying and Indexing MongoDB
MongoDB .local London 2019: Tips and Tricks++ for Querying and Indexing MongoDBMongoDB .local London 2019: Tips and Tricks++ for Querying and Indexing MongoDB
MongoDB .local London 2019: Tips and Tricks++ for Querying and Indexing MongoDB
 
MongoDB全機能解説2
MongoDB全機能解説2MongoDB全機能解説2
MongoDB全機能解説2
 
Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)Ruby Development and MongoMapper (John Nunemaker)
Ruby Development and MongoMapper (John Nunemaker)
 
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
 
Services Drupalcamp Stockholm 2009
Services Drupalcamp Stockholm 2009Services Drupalcamp Stockholm 2009
Services Drupalcamp Stockholm 2009
 
kissy-past-now-future
kissy-past-now-futurekissy-past-now-future
kissy-past-now-future
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
 
KISSY 的昨天、今天与明天
KISSY 的昨天、今天与明天KISSY 的昨天、今天与明天
KISSY 的昨天、今天与明天
 
Easy undo.key
Easy undo.keyEasy undo.key
Easy undo.key
 
MongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() Output
 
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperTame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapper
 
What istheservicestack
What istheservicestackWhat istheservicestack
What istheservicestack
 
Typescript - why it's awesome
Typescript - why it's awesomeTypescript - why it's awesome
Typescript - why it's awesome
 

Andere mochten auch

Andere mochten auch (6)

MongoDB for Analytics
MongoDB for AnalyticsMongoDB for Analytics
MongoDB for Analytics
 
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in GoPutting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
 
Blazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & SparkBlazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & Spark
 
Webinar: Faster Big Data Analytics with MongoDB
Webinar: Faster Big Data Analytics with MongoDBWebinar: Faster Big Data Analytics with MongoDB
Webinar: Faster Big Data Analytics with MongoDB
 
Using MongoDB with Hadoop & Spark
Using MongoDB with Hadoop & SparkUsing MongoDB with Hadoop & Spark
Using MongoDB with Hadoop & Spark
 
Top Three Big Data Governance Issues and How Apache ATLAS resolves it for the...
Top Three Big Data Governance Issues and How Apache ATLAS resolves it for the...Top Three Big Data Governance Issues and How Apache ATLAS resolves it for the...
Top Three Big Data Governance Issues and How Apache ATLAS resolves it for the...
 

Ähnlich wie MongoDB Online Conference: Introducing MongoDB 2.2

MongoDB Aggregation Framework
MongoDB Aggregation FrameworkMongoDB Aggregation Framework
MongoDB Aggregation Framework
Tyler Brock
 
CouchDB on Rails - FrozenRails 2010
CouchDB on Rails - FrozenRails 2010CouchDB on Rails - FrozenRails 2010
CouchDB on Rails - FrozenRails 2010
Jonathan Weiss
 
10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling
DATAVERSITY
 
1403 app dev series - session 5 - analytics
1403   app dev series - session 5 - analytics1403   app dev series - session 5 - analytics
1403 app dev series - session 5 - analytics
MongoDB
 
Marc s01 e02-crud-database
Marc s01 e02-crud-databaseMarc s01 e02-crud-database
Marc s01 e02-crud-database
MongoDB
 
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
MongoDB
 
Scaling MongoDB; Sharding Into and Beyond the Multi-Terabyte Range
Scaling MongoDB; Sharding Into and Beyond the Multi-Terabyte RangeScaling MongoDB; Sharding Into and Beyond the Multi-Terabyte Range
Scaling MongoDB; Sharding Into and Beyond the Multi-Terabyte Range
MongoDB
 

Ähnlich wie MongoDB Online Conference: Introducing MongoDB 2.2 (20)

MongoDB Aggregation Framework
MongoDB Aggregation FrameworkMongoDB Aggregation Framework
MongoDB Aggregation Framework
 
CouchDB on Rails - FrozenRails 2010
CouchDB on Rails - FrozenRails 2010CouchDB on Rails - FrozenRails 2010
CouchDB on Rails - FrozenRails 2010
 
CouchDB on Rails
CouchDB on RailsCouchDB on Rails
CouchDB on Rails
 
CouchDB on Rails - RailsWayCon 2010
CouchDB on Rails - RailsWayCon 2010CouchDB on Rails - RailsWayCon 2010
CouchDB on Rails - RailsWayCon 2010
 
Mongo db 2.2 aggregation like a champ
Mongo db 2.2 aggregation like a champMongo db 2.2 aggregation like a champ
Mongo db 2.2 aggregation like a champ
 
ActiveRecord vs Mongoid
ActiveRecord vs MongoidActiveRecord vs Mongoid
ActiveRecord vs Mongoid
 
NoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBNoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDB
 
MongoDB Aggregation Framework in action !
MongoDB Aggregation Framework in action !MongoDB Aggregation Framework in action !
MongoDB Aggregation Framework in action !
 
10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling
 
MongoDB Aggregation Framework
MongoDB Aggregation FrameworkMongoDB Aggregation Framework
MongoDB Aggregation Framework
 
MongoDB Aggregation
MongoDB Aggregation MongoDB Aggregation
MongoDB Aggregation
 
Webinar: Applikationsentwicklung mit MongoDB : Teil 5: Reporting & Aggregation
Webinar: Applikationsentwicklung mit MongoDB: Teil 5: Reporting & AggregationWebinar: Applikationsentwicklung mit MongoDB: Teil 5: Reporting & Aggregation
Webinar: Applikationsentwicklung mit MongoDB : Teil 5: Reporting & Aggregation
 
Schema design
Schema designSchema design
Schema design
 
Webinar: General Technical Overview of MongoDB for Dev Teams
Webinar: General Technical Overview of MongoDB for Dev TeamsWebinar: General Technical Overview of MongoDB for Dev Teams
Webinar: General Technical Overview of MongoDB for Dev Teams
 
MongoDB + node.js で作るソーシャルゲーム
MongoDB + node.js で作るソーシャルゲームMongoDB + node.js で作るソーシャルゲーム
MongoDB + node.js で作るソーシャルゲーム
 
1403 app dev series - session 5 - analytics
1403   app dev series - session 5 - analytics1403   app dev series - session 5 - analytics
1403 app dev series - session 5 - analytics
 
Marc s01 e02-crud-database
Marc s01 e02-crud-databaseMarc s01 e02-crud-database
Marc s01 e02-crud-database
 
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
 
Scaling MongoDB; Sharding Into and Beyond the Multi-Terabyte Range
Scaling MongoDB; Sharding Into and Beyond the Multi-Terabyte RangeScaling MongoDB; Sharding Into and Beyond the Multi-Terabyte Range
Scaling MongoDB; Sharding Into and Beyond the Multi-Terabyte Range
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 

Mehr von MongoDB

Mehr von MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

MongoDB Online Conference: Introducing MongoDB 2.2

  • 1. What’s new in MongoDB Version 2.2 20 September 2012 # m o n g od b2do t2
  • 2. Intro & Welcome Dwight Merriman, CEO & Co-Founder, 10gen
  • 3. The Aggregation Framework Edouard 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 viewCnt status: "active", FROM ….. post:"this is brilliant and wise and useful", GROUP BY author tags:["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 Workload Operational Workload Analytical Workload for users for business
  • 9. Concurrency Dwight Merriman, CEO & Co-Founder, 10gen
  • 10.
  • 14. Monitoring and Diagnostics • db.currentOp() • db.serverStatus() • mongostat • mongotop --locks • MMS (Mongo Monitoring Service)
  • 15. MMS
  • 16. MMS
  • 17.
  • 18. Data Center Awareness Eliot Horowitz, CTO & Co-Founder, 10gen
  • 20. 2.0 Setup NYC SFO Shard1 Primary Secondary Shard2 Primary Secondary My Writes My Reads Boston 8ms 8ms Chicago 23ms 23ms Los Angeles 83ms 83ms Paris 133ms 133ms Tokyo 174ms 174ms
  • 21. Tag Aware Sharding { country : “USA” , region : “CA” , picture_id : 12345 }
  • 22. 2.2 Setup SFO NYC Tag Shard1 Primary Secondary SFO Shard2 Secondary Primary NYC country region tag USA CA SFO USA FL NYC USA CA SFO
  • 23. My Writes My Reads Boston 8ms 8ms Chicago 23ms 23ms Los Angeles 10ms 10ms Paris 133ms 133ms Tokyo 95ms 95ms
  • 24. 2.2 Setup SFO NYC Amsterdam Tokyo Tag Shard1 Primary Secondary SFO Shard2 Secondary Primary NYC Shard3 Secondary Primary EMEA Shard4 Secondary Primary JAPAN country region tag USA CA SFO USA FL NYC USA CA SFO FRANCE EMEA CHINA JAPAN
  • 25. My Writes My Reads Boston 8ms 8ms Chicago 23ms 23ms Los Angeles 10ms 10ms Paris 10ms 10ms Tokyo 5ms 5ms
  • 26. My Writes My Reads Other Reads Boston 8ms 8ms 8ms Chicago 23ms 23ms 23ms Los Angeles 10ms 10ms 10ms Paris 10ms 10ms 10ms Tokyo 5ms 5ms 5ms
  • 27.
  • 28. My Writes My Reads Other Reads Boston 8ms 8ms 8ms Chicago 23ms 23ms 23ms Los Angeles 10ms 10ms 10ms Paris 10ms 10ms 10ms Tokyo 5ms 5ms 5ms
  • 30. TTL Collections Andrew Erlichson, VP of Education, 10gen
  • 32. Motivation Caching Operational Logging
  • 33. Motivation Caching Operational Logging Login Sessions
  • 35.
  • 36.
  • 37.
  • 38.
  • 40. Example of a TTL collection { _id: ObjectID(“62x4lad7za2”), username: “joe”, session_id: “x3490dfds383”, last_activity: ISODate(“2012-09-20T05:23:23”) }
  • 41. Making a collection TTL db.sessions.ensureIndex({“last_activity”: 1 “expireAfterSeconds”: 900})
  • 42.
  • 43. FREE Online MongoDB Classes education.10gen.com
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. Closing Remarks and Q&A Eliot Horowitz, CTO & Co-Founder, 10gen

Hinweis der Redaktion

  1. Largest changes to in any release to date
  2. Parallelism both i/o and cpuMongod processTwo new mechanisms
  3. 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
  4. Reader writer lock per databaseNo granularity to some granularity; more laterLocal database used by replication You can use multiple dbs if you need to
  5. http://www.flickr.com/photos/22627146@N00/926962569/----- Meeting Notes (9/14/12 09:26) -----Add Grid Locked Intersection photo, blocking the box.
  6. http://www.flickr.com/photos/22627146@N00/926962569/----- Meeting Notes (9/14/12 09:26) -----Add Grid Locked Intersection photo, blocking the box.
  7. Try it and give us your feedback.Next: data center awareness and tag aware sharding.
  8. What is it?NOT DRWhat do we want:Lowest latency possible for our usersPariton handlingNeed:Multiple data centers taking writes
  9. 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
  10. 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
  11. Administrators can use simple rules to make mongo put data in the most intelligent place
  12. Shard1’s primary move dto SFO2 nodes in the primary, 1 on secondary
  13. Now for users in LA, things are much betterTokyo is a little better, but not much
  14. Shard1’s primary move dto SFO2 nodes in the primary, 1 on secondary
  15. Now for users in LA, things are much betterTokyo is a little better, but not much
  16. Mongos routes to closest
  17. Mongos routes to closest
  18. Well, unless you are traveling, nothing
  19. Shard by timeCan move older data to slower machinesNew data can be on SSDs, etc..
  20. Education 10gen screenshot homepage
  21. M101 : MongoDB for Developers
  22. M102 : MongoDB for DBAs
  23. Edx.org