SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
Scott Hernandez




 ©"Copyright"2010"10gen"Inc."
Release History
•  First release – February 2009
•  v1.0 - August 2009
•  v1.2 - December 2009 – MapReduce, ++
•  v1.4 - March 2010 – Concurrency, Geo
•  V1.6 - August 2010 – Sharding, Replica Sets
•  V1.8 – March 2011 – Journaling, Geosphere
•  V2.0 -- Sep 2011 – V1 Indexes, Concurrency
Types of Non-Relational Data Models
•  Key-value stores
•  Document stores
•  Column-oriented databases
•  Graph databases
What is MongoDB
•  Document Store
•  Horizontally Scalable
•  High Performance
MongoDB vs Traditional RDBMS
             server"
                              schema"
databases" coll
                  ections
                          "
        contain"tables""
                            documen
                                     ts"
                       contain"rows"
  joins"
Terminology

RDBMS&           Mongo&
Table,"View"     Collection"
Row(s)"          JSON"Document"
Index"           Index"
Join"            Embedded"Document"
Partition"       Shard"
Partition"Key"   Shard"Key"
MongoDB is a Single-Master System
•  All writes are to a primary (master)
•  Failure of the primary is detected, and a new
   one is elected
•  Application writes get an error if there is no
   quorum to elect a new master
  •  Reads can continue
Consistency Models
•  Relational databases support transactions
  •  Can only see committed changes
  •  Commits/aborts span multiple changes
  •  Read-only transaction flavors
    •  Read committed, repeatable read, etc
•  Single vs Multi-Master
Single Master
•  All writes go to a single master and then
   replicated
•  Replication can provide read scalability
•  Writing becomes a bottleneck
  •  Physical limitations (seek time)
  •  Throughput of a single I/O subsystem
Single Master - Sharding
•  Partition the primary key space via hashing
•  Set up a duplicate system for each shard
  •  The write-rate limitation now applies to each
     shard
  •  Joins or aggregation across shards are
     problematic
  •  Can the data be re-sharded on a live system?
  •  Can shards be re-balanced on a live system?
MongoDB Storage Management
•  Memory-mapped Database files
•  Files are (pre)allocated as needed
•  Indexes (B*-trees) point to documents
Documents
Blog Post Document"
"
 p = { author: “sridhar”,"
       date: new Date(),"
       title: “Using the C# driver with MongoDB”,"
       tags: [“NoSQL”, “Mongo”, “MongoDB”]}"
"
> db.posts.save(p)"
Querying
 >db.posts.find()"
"
    { _id : ObjectId("4c4ba5c0672c685e5e8aabf3"),"
      author : “sridhar", "
      date : “Mon Jul 11 2011 19:47:11 GMT-0700
(PDT)", "
        title: “Using the C# driver with MongoDB”,"
        tags: [“NoSQL”, “Mongo”, “MongoDB”]} "
  "
Secondary Indexes
Create index on any Field in Document"
"
   // 1 means ascending, -1 means descending"
"
   >db.posts.ensureIndex({author: 1})"
"
   >db.posts.find({author: ʻsridhar'}) "
 "
   { _id     : ObjectId("4c4ba5c0672c685e5e8aabf3"),"
     author : “sridhar", "
     ... }"
Query Operators
•  Conditional Operators "
  •  $all, $exists, $mod, $ne, $in, $nin, $nor, $or, $size, $type"
  •  $lt, $lte, $gt, $gte"
  "
  // find posts with any tags "
  > db.posts.find( {tags: {$exists: true }} )"
  "
  // find posts matching a regular expression"
  > db.posts.find( {author: /^sri*/i } )"
  "
  // count posts by author"
  > db.posts.find( {author: ʻsridharʼ} ).count()"
Atomic Operations
•  $set, $unset, $inc, $push, $pushAll, $pull,
  $pullAll, $bit"

> comment = { author: “fred”, "
              date: new Date(),"
              text: “Interesting blog post”}"
"
 > db.posts.update( { _id: “...” }, "
     "    "$push: {comments: comment} );"
"
Nested Documents

{ _id : ObjectId("4c4ba5c0672c685e5e8aabf3"), "
  author : “sridhar","
  date : “Mon Jul 11 2011 19:47:11 GMT-0700 (PDT)", "
  text : “Using the C# driver with MongoDB","
  tags : [ “NoSQL", “Mongo", “MongoDB" ],"
  comments : ["
       "{"
       "       "author : "Fred","
       "       "date : “Mon Jul 11 2011 20:51:03 GMT-0700 (PDT)","
       "       "text : “Interesting blog post""
       "}"
  ]}"
Indexes
 // Index nested documents
 > db.posts.ensureIndex( “comments.author”:1 )
  !  db.posts.find({‘comments.author’:’Fred’})

 // Index on tags
 > db.posts.ensureIndex( tags: 1)
 > db.posts.find( { tags: ’Mongo’ } )

 // geospatial index
 > db.posts.ensureIndex( “author.location”: “2d” )
 > db.posts.find( “author.location” : { $near : [22,42] } )
MongoDB – More
•  Geo-spatial queries
  •  Require a geo index
  •  Find points near a given point
  •  Find points within a polygon/sphere
•  Built-in Map-Reduce
  •  The caller provides map and reduce functions
    written in JavaScript
Scaling MongoDB
•  Replication - Read scalability
  •  Master/Slave
  •  Replica Sets
•  Sharding – Read and write scalability
  •  Collections are sharded
  •  Each shard is served by its own replica set
  •  Shard key ranges are automatically balanced
Write"       Read"


      MongoS"     MongoS"     MongoS"       MongoS"




 Key Range"      Key Range"    Key Range"       Key Range"
 0..30"          31..60"       61..90"          91.. 100"


 Primary"        Primary"      Primary"         Primary"


Secondary"      Secondary"    Secondary"       Secondary"


Secondary"      Secondary"    Secondary"       Secondary"
MongoDB Access
•  Drivers are available in many languages
  •  10gen supported
     •  C, C# (.Net), C++, Erlang, Haskell, Java,
        JavaScript, Perl, PHP, Python, Ruby, Scala
  •  Community supported
    •  Clojure, ColdFusion, F#, Go, Groovy, Lua, R
    •  http://www.mongodb.org/display/DOCS/Overview+-
       +Writing+Drivers+and+Tools
MongoDB Availability
•  Source
  •  https://github.com/mongodb/mongo
•  Server
  •  License: AGPL
  •  http://www.mongodb.org/downloads
•  Drivers
  •  License: Apache
  •  http://www.mongodb.org/display/DOCS/Drivers
download at mongodb.org

                  We’re"Hiring"!"
       Engineers,"Sales,"Evangelist,"Marketing,"Support,"Developers""

        conferences,"appearances,"and"meetups"
                   http://www.10gen.com/events"
                                "


   Facebook""""""""""|"""""""""Twitter"""""""""|"""""""""LinkedIn"
http://bit.ly/mongoQ""           @mongodb"                  http://linkd.in/joinmongo"



                             ©"Copyright"2010"10gen"Inc."
Use cases and customers
•  Use cases
•  Case studies
Content Management
Gaming
Analytics
try at try.mongodb.org




      ©"Copyright"2010"10gen"Inc."
download at mongodb.org

                     We’re"Hiring"!"
                 sridhar@10gen.com"
                      @snanjund"
        conferences,"appearances,"and"meetups"
                   http://www.10gen.com/events"
                                "


   Facebook""""""""""|"""""""""Twitter"""""""""|"""""""""LinkedIn"
http://bit.ly/mongoQ""        @mongodb"                  http://linkd.in/joinmongo"



                          ©"Copyright"2010"10gen"Inc."

Más contenido relacionado

La actualidad más candente

How To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own DatasourceHow To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own DatasourceMongoDB
 
MongoDB at the Silicon Valley iPhone and iPad Developers' Meetup
MongoDB at the Silicon Valley iPhone and iPad Developers' MeetupMongoDB at the Silicon Valley iPhone and iPad Developers' Meetup
MongoDB at the Silicon Valley iPhone and iPad Developers' MeetupMongoDB
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Consjohnrjenson
 
Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDBMongoDB
 
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...MongoDB
 
Strengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBStrengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBlehresman
 
Practical Elasticsearch - real world use cases
Practical Elasticsearch - real world use casesPractical Elasticsearch - real world use cases
Practical Elasticsearch - real world use casesItamar
 
Back to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in DocumentsBack to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in DocumentsJoe Drumgoole
 
MongoDB Best Practices in AWS
MongoDB Best Practices in AWS MongoDB Best Practices in AWS
MongoDB Best Practices in AWS Chris Harris
 
Back to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1 - Introduction to NoSQLBack to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1 - Introduction to NoSQLJoe Drumgoole
 
MongoDB Days Silicon Valley: Jumpstart: Ops/Admin 101
MongoDB Days Silicon Valley: Jumpstart: Ops/Admin 101MongoDB Days Silicon Valley: Jumpstart: Ops/Admin 101
MongoDB Days Silicon Valley: Jumpstart: Ops/Admin 101MongoDB
 
Scaling with MongoDB
Scaling with MongoDBScaling with MongoDB
Scaling with MongoDBMongoDB
 
Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationBack to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationMongoDB
 
Scaling with MongoDB
Scaling with MongoDBScaling with MongoDB
Scaling with MongoDBRick Copeland
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDBStone Gao
 

La actualidad más candente (20)

How To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own DatasourceHow To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own Datasource
 
The What and Why of NoSql
The What and Why of NoSqlThe What and Why of NoSql
The What and Why of NoSql
 
MongoDB at the Silicon Valley iPhone and iPad Developers' Meetup
MongoDB at the Silicon Valley iPhone and iPad Developers' MeetupMongoDB at the Silicon Valley iPhone and iPad Developers' Meetup
MongoDB at the Silicon Valley iPhone and iPad Developers' Meetup
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Cons
 
Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDB
 
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...
 
Strengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBStrengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDB
 
Mongo db japan
Mongo db japanMongo db japan
Mongo db japan
 
Mongodb
MongodbMongodb
Mongodb
 
Practical Elasticsearch - real world use cases
Practical Elasticsearch - real world use casesPractical Elasticsearch - real world use cases
Practical Elasticsearch - real world use cases
 
Back to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in DocumentsBack to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in Documents
 
MongoDB Best Practices in AWS
MongoDB Best Practices in AWS MongoDB Best Practices in AWS
MongoDB Best Practices in AWS
 
Back to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1 - Introduction to NoSQLBack to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1 - Introduction to NoSQL
 
MongoDB Days Silicon Valley: Jumpstart: Ops/Admin 101
MongoDB Days Silicon Valley: Jumpstart: Ops/Admin 101MongoDB Days Silicon Valley: Jumpstart: Ops/Admin 101
MongoDB Days Silicon Valley: Jumpstart: Ops/Admin 101
 
Scaling with MongoDB
Scaling with MongoDBScaling with MongoDB
Scaling with MongoDB
 
Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationBack to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB Application
 
MongoDB for Developers
MongoDB for DevelopersMongoDB for Developers
MongoDB for Developers
 
Scaling with MongoDB
Scaling with MongoDBScaling with MongoDB
Scaling with MongoDB
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDB
 

Destacado

Schema Design at Scale
Schema Design at ScaleSchema Design at Scale
Schema Design at ScaleRick Copeland
 
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)MongoDB
 
Scalable Event Analytics with MongoDB & Ruby on Rails
Scalable Event Analytics with MongoDB & Ruby on RailsScalable Event Analytics with MongoDB & Ruby on Rails
Scalable Event Analytics with MongoDB & Ruby on RailsJared Rosoff
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDBrogerbodamer
 
MongoDB for Time Series Data: Setting the Stage for Sensor Management
MongoDB for Time Series Data: Setting the Stage for Sensor ManagementMongoDB for Time Series Data: Setting the Stage for Sensor Management
MongoDB for Time Series Data: Setting the Stage for Sensor ManagementMongoDB
 
MongoDB for Time Series Data: Schema Design
MongoDB for Time Series Data: Schema DesignMongoDB for Time Series Data: Schema Design
MongoDB for Time Series Data: Schema DesignMongoDB
 
MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema DesignMongoDB
 
MongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMike Friedman
 

Destacado (8)

Schema Design at Scale
Schema Design at ScaleSchema Design at Scale
Schema Design at Scale
 
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
 
Scalable Event Analytics with MongoDB & Ruby on Rails
Scalable Event Analytics with MongoDB & Ruby on RailsScalable Event Analytics with MongoDB & Ruby on Rails
Scalable Event Analytics with MongoDB & Ruby on Rails
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDB
 
MongoDB for Time Series Data: Setting the Stage for Sensor Management
MongoDB for Time Series Data: Setting the Stage for Sensor ManagementMongoDB for Time Series Data: Setting the Stage for Sensor Management
MongoDB for Time Series Data: Setting the Stage for Sensor Management
 
MongoDB for Time Series Data: Schema Design
MongoDB for Time Series Data: Schema DesignMongoDB for Time Series Data: Schema Design
MongoDB for Time Series Data: Schema Design
 
MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema Design
 
MongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World Examples
 

Similar a 10gen MongoDB Video Presentation at WebGeek DevCup

Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBMongoDB
 
Mongodb intro
Mongodb introMongodb intro
Mongodb introchristkv
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewAntonio Pintus
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Railsrfischer20
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBSean Laurent
 
MongoDB Hadoop DC
MongoDB Hadoop DCMongoDB Hadoop DC
MongoDB Hadoop DCMike Dirolf
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 
OSDC 2012 | Building a first application on MongoDB by Ross Lawley
OSDC 2012 | Building a first application on MongoDB by Ross LawleyOSDC 2012 | Building a first application on MongoDB by Ross Lawley
OSDC 2012 | Building a first application on MongoDB by Ross LawleyNETWAYS
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesignMongoDB APAC
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharpSerdar Buyuktemiz
 
Mongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in BangaloreMongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in Bangalorerajkamaltibacademy
 
MongoDB at FrozenRails
MongoDB at FrozenRailsMongoDB at FrozenRails
MongoDB at FrozenRailsMike Dirolf
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBMongoDB
 
2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongoMichael Bright
 
Using MongoDB and Python
Using MongoDB and PythonUsing MongoDB and Python
Using MongoDB and PythonMike Bright
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.Emroz Sardar
 
Using MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 MinutesUsing MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 MinutesAndrás Fehér
 

Similar a 10gen MongoDB Video Presentation at WebGeek DevCup (20)

Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overview
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB at RuPy
MongoDB at RuPyMongoDB at RuPy
MongoDB at RuPy
 
MongoDB Hadoop DC
MongoDB Hadoop DCMongoDB Hadoop DC
MongoDB Hadoop DC
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
OSDC 2012 | Building a first application on MongoDB by Ross Lawley
OSDC 2012 | Building a first application on MongoDB by Ross LawleyOSDC 2012 | Building a first application on MongoDB by Ross Lawley
OSDC 2012 | Building a first application on MongoDB by Ross Lawley
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesign
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
Mongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in BangaloreMongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in Bangalore
 
MongoDB at FrozenRails
MongoDB at FrozenRailsMongoDB at FrozenRails
MongoDB at FrozenRails
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
 
2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo2016 feb-23 pyugre-py_mongo
2016 feb-23 pyugre-py_mongo
 
Using MongoDB and Python
Using MongoDB and PythonUsing MongoDB and Python
Using MongoDB and Python
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.
 
MongoDB
MongoDBMongoDB
MongoDB
 
Using MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 MinutesUsing MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 Minutes
 

Más de WebGeek Philippines

Good Software Engineering Practices by Jesse Panganiban
Good Software Engineering Practices by Jesse PanganibanGood Software Engineering Practices by Jesse Panganiban
Good Software Engineering Practices by Jesse PanganibanWebGeek Philippines
 
WebGeek AppNimbus (Nikko Bautista)
WebGeek AppNimbus (Nikko Bautista)WebGeek AppNimbus (Nikko Bautista)
WebGeek AppNimbus (Nikko Bautista)WebGeek Philippines
 
Products = Mess - How to avoid it? By Suman Mukherjee
Products = Mess - How to avoid it?  By Suman MukherjeeProducts = Mess - How to avoid it?  By Suman Mukherjee
Products = Mess - How to avoid it? By Suman MukherjeeWebGeek Philippines
 
The Next Big Thing (Freelancer.com) - WebGeek DevCup
The Next Big Thing (Freelancer.com) - WebGeek DevCupThe Next Big Thing (Freelancer.com) - WebGeek DevCup
The Next Big Thing (Freelancer.com) - WebGeek DevCupWebGeek Philippines
 
The BlackBerry Opportunity at WebGeek DevCup
The BlackBerry Opportunity at WebGeek DevCupThe BlackBerry Opportunity at WebGeek DevCup
The BlackBerry Opportunity at WebGeek DevCupWebGeek Philippines
 
WebGeek DevCup Rules (At Pre-DevCup)
WebGeek DevCup Rules (At Pre-DevCup)WebGeek DevCup Rules (At Pre-DevCup)
WebGeek DevCup Rules (At Pre-DevCup)WebGeek Philippines
 

Más de WebGeek Philippines (11)

Good Software Engineering Practices by Jesse Panganiban
Good Software Engineering Practices by Jesse PanganibanGood Software Engineering Practices by Jesse Panganiban
Good Software Engineering Practices by Jesse Panganiban
 
Rules at #4SQHACKPH
Rules at #4SQHACKPHRules at #4SQHACKPH
Rules at #4SQHACKPH
 
Intro at #4SQHACKPH
Intro at #4SQHACKPHIntro at #4SQHACKPH
Intro at #4SQHACKPH
 
Theme at #4SQHACKPH
Theme at #4SQHACKPHTheme at #4SQHACKPH
Theme at #4SQHACKPH
 
Foursquare API + GoRated.PH
Foursquare API + GoRated.PHFoursquare API + GoRated.PH
Foursquare API + GoRated.PH
 
WebGeek AppNimbus (Nikko Bautista)
WebGeek AppNimbus (Nikko Bautista)WebGeek AppNimbus (Nikko Bautista)
WebGeek AppNimbus (Nikko Bautista)
 
Products = Mess - How to avoid it? By Suman Mukherjee
Products = Mess - How to avoid it?  By Suman MukherjeeProducts = Mess - How to avoid it?  By Suman Mukherjee
Products = Mess - How to avoid it? By Suman Mukherjee
 
The Next Big Thing (Freelancer.com) - WebGeek DevCup
The Next Big Thing (Freelancer.com) - WebGeek DevCupThe Next Big Thing (Freelancer.com) - WebGeek DevCup
The Next Big Thing (Freelancer.com) - WebGeek DevCup
 
The BlackBerry Opportunity at WebGeek DevCup
The BlackBerry Opportunity at WebGeek DevCupThe BlackBerry Opportunity at WebGeek DevCup
The BlackBerry Opportunity at WebGeek DevCup
 
WebGeek DevCup Theme
WebGeek DevCup ThemeWebGeek DevCup Theme
WebGeek DevCup Theme
 
WebGeek DevCup Rules (At Pre-DevCup)
WebGeek DevCup Rules (At Pre-DevCup)WebGeek DevCup Rules (At Pre-DevCup)
WebGeek DevCup Rules (At Pre-DevCup)
 

Último

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Último (20)

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

10gen MongoDB Video Presentation at WebGeek DevCup

  • 2. Release History •  First release – February 2009 •  v1.0 - August 2009 •  v1.2 - December 2009 – MapReduce, ++ •  v1.4 - March 2010 – Concurrency, Geo •  V1.6 - August 2010 – Sharding, Replica Sets •  V1.8 – March 2011 – Journaling, Geosphere •  V2.0 -- Sep 2011 – V1 Indexes, Concurrency
  • 3. Types of Non-Relational Data Models •  Key-value stores •  Document stores •  Column-oriented databases •  Graph databases
  • 4. What is MongoDB •  Document Store •  Horizontally Scalable •  High Performance
  • 5. MongoDB vs Traditional RDBMS server" schema" databases" coll ections " contain"tables"" documen ts" contain"rows" joins"
  • 6. Terminology RDBMS& Mongo& Table,"View" Collection" Row(s)" JSON"Document" Index" Index" Join" Embedded"Document" Partition" Shard" Partition"Key" Shard"Key"
  • 7. MongoDB is a Single-Master System •  All writes are to a primary (master) •  Failure of the primary is detected, and a new one is elected •  Application writes get an error if there is no quorum to elect a new master •  Reads can continue
  • 8. Consistency Models •  Relational databases support transactions •  Can only see committed changes •  Commits/aborts span multiple changes •  Read-only transaction flavors •  Read committed, repeatable read, etc •  Single vs Multi-Master
  • 9. Single Master •  All writes go to a single master and then replicated •  Replication can provide read scalability •  Writing becomes a bottleneck •  Physical limitations (seek time) •  Throughput of a single I/O subsystem
  • 10. Single Master - Sharding •  Partition the primary key space via hashing •  Set up a duplicate system for each shard •  The write-rate limitation now applies to each shard •  Joins or aggregation across shards are problematic •  Can the data be re-sharded on a live system? •  Can shards be re-balanced on a live system?
  • 11. MongoDB Storage Management •  Memory-mapped Database files •  Files are (pre)allocated as needed •  Indexes (B*-trees) point to documents
  • 12. Documents Blog Post Document" " p = { author: “sridhar”," date: new Date()," title: “Using the C# driver with MongoDB”," tags: [“NoSQL”, “Mongo”, “MongoDB”]}" " > db.posts.save(p)"
  • 13. Querying >db.posts.find()" " { _id : ObjectId("4c4ba5c0672c685e5e8aabf3")," author : “sridhar", " date : “Mon Jul 11 2011 19:47:11 GMT-0700 (PDT)", " title: “Using the C# driver with MongoDB”," tags: [“NoSQL”, “Mongo”, “MongoDB”]} " "
  • 14. Secondary Indexes Create index on any Field in Document" " // 1 means ascending, -1 means descending" " >db.posts.ensureIndex({author: 1})" " >db.posts.find({author: ʻsridhar'}) " " { _id : ObjectId("4c4ba5c0672c685e5e8aabf3")," author : “sridhar", " ... }"
  • 15. Query Operators •  Conditional Operators " •  $all, $exists, $mod, $ne, $in, $nin, $nor, $or, $size, $type" •  $lt, $lte, $gt, $gte" " // find posts with any tags " > db.posts.find( {tags: {$exists: true }} )" " // find posts matching a regular expression" > db.posts.find( {author: /^sri*/i } )" " // count posts by author" > db.posts.find( {author: ʻsridharʼ} ).count()"
  • 16. Atomic Operations •  $set, $unset, $inc, $push, $pushAll, $pull, $pullAll, $bit" > comment = { author: “fred”, " date: new Date()," text: “Interesting blog post”}" " > db.posts.update( { _id: “...” }, " " "$push: {comments: comment} );" "
  • 17. Nested Documents { _id : ObjectId("4c4ba5c0672c685e5e8aabf3"), " author : “sridhar"," date : “Mon Jul 11 2011 19:47:11 GMT-0700 (PDT)", " text : “Using the C# driver with MongoDB"," tags : [ “NoSQL", “Mongo", “MongoDB" ]," comments : [" "{" " "author : "Fred"," " "date : “Mon Jul 11 2011 20:51:03 GMT-0700 (PDT)"," " "text : “Interesting blog post"" "}" ]}"
  • 18. Indexes // Index nested documents > db.posts.ensureIndex( “comments.author”:1 ) !  db.posts.find({‘comments.author’:’Fred’}) // Index on tags > db.posts.ensureIndex( tags: 1) > db.posts.find( { tags: ’Mongo’ } ) // geospatial index > db.posts.ensureIndex( “author.location”: “2d” ) > db.posts.find( “author.location” : { $near : [22,42] } )
  • 19. MongoDB – More •  Geo-spatial queries •  Require a geo index •  Find points near a given point •  Find points within a polygon/sphere •  Built-in Map-Reduce •  The caller provides map and reduce functions written in JavaScript
  • 20. Scaling MongoDB •  Replication - Read scalability •  Master/Slave •  Replica Sets •  Sharding – Read and write scalability •  Collections are sharded •  Each shard is served by its own replica set •  Shard key ranges are automatically balanced
  • 21. Write" Read" MongoS" MongoS" MongoS" MongoS" Key Range" Key Range" Key Range" Key Range" 0..30" 31..60" 61..90" 91.. 100" Primary" Primary" Primary" Primary" Secondary" Secondary" Secondary" Secondary" Secondary" Secondary" Secondary" Secondary"
  • 22. MongoDB Access •  Drivers are available in many languages •  10gen supported •  C, C# (.Net), C++, Erlang, Haskell, Java, JavaScript, Perl, PHP, Python, Ruby, Scala •  Community supported •  Clojure, ColdFusion, F#, Go, Groovy, Lua, R •  http://www.mongodb.org/display/DOCS/Overview+- +Writing+Drivers+and+Tools
  • 23. MongoDB Availability •  Source •  https://github.com/mongodb/mongo •  Server •  License: AGPL •  http://www.mongodb.org/downloads •  Drivers •  License: Apache •  http://www.mongodb.org/display/DOCS/Drivers
  • 24. download at mongodb.org We’re"Hiring"!" Engineers,"Sales,"Evangelist,"Marketing,"Support,"Developers"" conferences,"appearances,"and"meetups" http://www.10gen.com/events" " Facebook""""""""""|"""""""""Twitter"""""""""|"""""""""LinkedIn" http://bit.ly/mongoQ"" @mongodb" http://linkd.in/joinmongo" ©"Copyright"2010"10gen"Inc."
  • 25. Use cases and customers •  Use cases •  Case studies
  • 29. try at try.mongodb.org ©"Copyright"2010"10gen"Inc."
  • 30. download at mongodb.org We’re"Hiring"!" sridhar@10gen.com" @snanjund" conferences,"appearances,"and"meetups" http://www.10gen.com/events" " Facebook""""""""""|"""""""""Twitter"""""""""|"""""""""LinkedIn" http://bit.ly/mongoQ"" @mongodb" http://linkd.in/joinmongo" ©"Copyright"2010"10gen"Inc."