SlideShare a Scribd company logo
MongoDB: What,why,when.
SolutionsArchitect,MongoDB Inc.
Massimo Brignoli
#mongodb
Who Am I?
• Solutions Architect/Evangelist in MongoDB Inc.
• 24 years of experience in databases and software
development
• Former MySQL employee
• Previous life: web,web,web
Innovation
Understanding Big Data – It’s Not Very“Big”
from Big Data Executive Summary – 50+ top executives from Government and F500 firms
64% - Ingest diverse,
new data in real-time
15% - More than 100TB
of data
20% - Less than 100TB
(average of all? <20TB)
“I have not failed. I've just found 10,000 ways that won't work.”
― Thomas A. Edison
Back in 1970…Cars Were Great!
Lots of Great Innovations Since 1970
Would you use these
technologies for your
business today?
Including the Relational Database
For which computers the
relational model has been
designed for?
So Were Computers!
And Storage!
RDBMS Makes Development Hard
Relational Database
Object Relational
Mapping
Application
Code XML Config DB Schema
And Even Harder To Iterate
New Table
New Table
New
Column
Name Pet Phone Email
New
Column
3 months later…
RDBMS
From Complexity to Simplicity
MongoDB
{
_id : ObjectId("4c4ba5e5e8aabf3"),
employee_name: "Dunham, Justin",
department : "Marketing",
title : "Product Manager, Web",
report_up: "Neray, Graham",
pay_band: “C",
benefits : [
{ type : "Health",
plan : "PPO Plus" },
{ type : "Dental",
plan : "Standard" }
]
}
MongoDB
The leading NoSQL database
Document
Database
Open-
Source
General
Purpose
7,000,000+
MongoDB Downloads
150,000+
Online Education Registrants
25,000+
MongoDB User Group Members
25,000+
MongoDB DaysAttendees
20,000+
MongoDB Management Service (MMS) Users
Global Community
To provide the best database for how we build and
run apps today
MongoDB Vision
Build
– New and complex data
– Flexible
– New languages
– Faster development
Run
– Big Data scalability
– Real-time
– Commodity hardware
– Cloud
Enterprise Big Data Stack
EDWHadoop
Management&Monitoring
Security&Auditing
RDBMS
CRM, ERP, Collaboration, Mobile, BI
OS & Virtualization, Compute, Storage, Network
RDBMS
Applications
Infrastructure
Data Management
Online Data Offline Data
Agile
MongoDB Overview
Scalable
Operational Database Landscape
Key → Value
• One-dimensional storage
• Single value is a blob
• Query on key only
• No schema
• Value cannot be updated,only replaced
Key Blob
Relational/Wide Column
• Two-dimensional storage (tuples)
• Each field contains a single value
• Query on anyfield
• Very structured schema (table)
• In-place updates
• Normalization process requires many tables, joins,
indexes,and poor data locality
Primary
Key
Document
• N-dimensional storage
• Each field can contain 0,1,
many,or embedded values
• Query on anyfield & level
• Flexible schema
• Inline updates *
• Embedding related data has optimal data locality,
requires fewer indexes,has better performance
_id
Document Data Model
Relational MongoDB
{
first_name: ‘Paul’,
surname: ‘Miller’,
city: ‘London’,
location: [45.123,47.232],
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
]
}
Document Model Benefits
• Agility and flexibility
– Data models can evolve easily
– Companies can adapt to changes quickly
• Intuitive,natural data representation
– Developers are more productive
– Manytypes of applications are a good fit
• Reduces the need for joins,disk seeks
– Programming is more simple
– Performance can be delivered at scale
Developers are more productive
Developers are more productive
Automatic Sharding
• Three types of sharding: hash-based, range-based, tag-
aware!
• Increase or decrease capacity as you go!
• Automatic balancing
Query Routing
• Multiple query optimization models!
• Each sharding option appropriate for different apps!
HighAvailability–Ensure application availabilityduring many
types of failures
!
Disaster Recovery–Address the RTO and RPO goals for business
continuity
!
Maintenance –Perform upgrades and other maintenance
operations with no application downtime
Availability Considerations
Replica Sets
• Replica Set – two or more copies!
• “Self-healing” shard!
• Addresses many concerns:!
- High Availability!
- Disaster Recovery!
- Maintenance
Strong Consistency
Delayed Consistency
Write Concern
• Network acknowledgement
• Wait for error
• Wait for journal sync
• Wait for replication
Unacknowledged
MongoDB Acknowledged (wait for error)
Wait for Journal Sync
Wait for Replication
Tagging
• Control where data is written to,and read from
• Each member can have one or more tags
– tags: {dc:"ny"}
– tags: {dc:"ny",

subnet:"192.168",

rack:"row3rk7"}
• Replica set defines rules for write concerns
• Rules can change without changing app code
{!
_id : "mySet",!
members : [!
{_id : 0, host : "A", tags : {"dc": "ny"}},!
{_id : 1, host : "B", tags : {"dc": "ny"}},!
{_id : 2, host : "C", tags : {"dc": "sf"}},!
{_id : 3, host : "D", tags : {"dc": "sf"}},!
{_id : 4, host : "E", tags : {"dc": "cloud"}}],!
settings : {!
getLastErrorModes : {!
allDCs : {"dc" : 3},!
someDCs : {"dc" : 2}} }!
}!
> db.blogs.insert({...})!
> db.runCommand({getLastError : 1, w : "someDCs"})
Tagging Example
Wait for Replication (Tagging)
Read Preference Modes
• 5 modes
– primary(only)-Default
– primaryPreferred
– secondary
– secondaryPreferred
– Nearest
!
When more than one node is possible,closest node is used for
reads (all modes but primary)
Single Data Center
• Automated failover !
• Tolerates server failures!
• Tolerates rack failures!
• Number of replicas
defines failure tolerance
Primary –A Primary – B Primary – C
Secondary –A Secondary –ASecondary – B
Secondary – BSecondary – CSecondary – C
Active/Standby Data Center
• Tolerates server and rack failure!
• Standby data center
Data Center - West
Primary –A Primary – B Primary – C
Secondary –ASecondary – B Secondary – C
Data Center - East
Secondary –A Secondary – B Secondary – C
Active/Active Data Center
• Tolerates server, rack, data center failures, network
partitions
Data Center - West
Primary –A Primary – B Primary – C
Secondary –A Secondary – BSecondary – C
Data Center - East
Secondary –A Secondary – B Secondary – C
Secondary – B Secondary – C Secondary –A
Data Center - Central
Arbiter –A Arbiter – B Arbiter – C
Global Data Distribution
Real-time
Real-time Real-time
Real-time
Real-time
Real-time
Real-time
Primary
Secondary
Secondary
Secondary
Secondary
Secondary
Secondary
Secondary
Read Global/Write Local
Primary:NYC
Secondary:NYC
Primary:LON
Primary:SYD
Secondary:LON
Secondary:NYC
Secondary:SYD
Secondary:LON
Secondary:SYD
Common Use Cases
High Volume Data Feeds
••More machine forms, sensors & data
••Variably structured
Machine
Generated Data
••High frequency trading
••Daily closing price
Securities Data
••Multiple data sources
••Each changes their format consistently
••Student Scores, ISP logs
Social Media /
General Public
Operational Intelligence
••Large volume of users
••Very strict latency requirements
••Sentiment Analysis
Ad Targeting
••Expose data to millions of customers
••Reports on large volumes of data
••Reports that update in real time
Real time
dashboards
••Join the conversation
••Catered Games
••Customized Surveys
Social Media
Monitoring
Metadata
••Diverse product portfolio
••Complex querying and filtering
••Multi-faceted product attributes
Product
Catalogue
••Data mining
••Call records
••Insurance Claims
Data analysis
••Retina Scans
••Fingerprints
Biometric
Content Management
••Comments and user generated content
••Personalization of content and layout
News Site
••Generate layout on the fly
••No need to cache static pages
Multi-device
rendering
••Store large objects
••Simpler modeling of metadata
Sharing
Questions?
Thanks!
@massimobrignoli
Massimo Brignoli
#MongoDB
SolutionsArchitect,MongoDB Inc.
massimo@mongodb.com

More Related Content

What's hot (20)

PPTX
HBaseCon 2013: Deal Personalization Engine with HBase @ Groupon
Cloudera, Inc.
 
PPTX
Webinar: An Enterprise Architect’s View of MongoDB
MongoDB
 
PPTX
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
PPTX
MongoDB and RDBMS: Using Polyglot Persistence at Equifax
MongoDB
 
PPTX
MongoDB
Albin John
 
PDF
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
Md Kamaruzzaman
 
PPTX
Relational and non relational database 7
abdulrahmanhelan
 
PDF
Common MongoDB Use Cases
DATAVERSITY
 
ODP
Nonrelational Databases
Udi Bauman
 
PPTX
NOSQL Databases types and Uses
Suvradeep Rudra
 
PPTX
NoSQL and The Big Data Hullabaloo
Andrew Brust
 
PPTX
Prepare for Peak Holiday Season with MongoDB
MongoDB
 
PDF
Practical Use of a NoSQL
IBM Cloud Data Services
 
PDF
MongoDB: The Operational Big Data by NORBERTO LEITE at Big Data Spain 2014
Big Data Spain
 
PPT
Schemaless Databases
Dan Gunter
 
KEY
NoSQL databases and managing big data
Steven Francia
 
PDF
Polyglot Persistence vs Multi-Model Databases
Luca Garulli
 
PDF
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
MongoDB
 
PPTX
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
MongoDB
 
PPTX
Big Data: Guidelines and Examples for the Enterprise Decision Maker
MongoDB
 
HBaseCon 2013: Deal Personalization Engine with HBase @ Groupon
Cloudera, Inc.
 
Webinar: An Enterprise Architect’s View of MongoDB
MongoDB
 
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
MongoDB and RDBMS: Using Polyglot Persistence at Equifax
MongoDB
 
MongoDB
Albin John
 
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
Md Kamaruzzaman
 
Relational and non relational database 7
abdulrahmanhelan
 
Common MongoDB Use Cases
DATAVERSITY
 
Nonrelational Databases
Udi Bauman
 
NOSQL Databases types and Uses
Suvradeep Rudra
 
NoSQL and The Big Data Hullabaloo
Andrew Brust
 
Prepare for Peak Holiday Season with MongoDB
MongoDB
 
Practical Use of a NoSQL
IBM Cloud Data Services
 
MongoDB: The Operational Big Data by NORBERTO LEITE at Big Data Spain 2014
Big Data Spain
 
Schemaless Databases
Dan Gunter
 
NoSQL databases and managing big data
Steven Francia
 
Polyglot Persistence vs Multi-Model Databases
Luca Garulli
 
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
MongoDB
 
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
MongoDB
 
Big Data: Guidelines and Examples for the Enterprise Decision Maker
MongoDB
 

Viewers also liked (8)

PDF
Come sfruttare tutte le potenzialità di Symfony in Drupal 8
Eugenio Minardi
 
PPT
Drupal Platform first Design
Eugenio Minardi
 
PDF
Migrare siti web
Eugenio Minardi
 
PDF
Creazione di un modulo per la gestione delle password
Eugenio Minardi
 
PDF
Angular JS - Javascript framework for superheroes
Eugenio Minardi
 
PDF
Another Copernican Revolution: maintenance first, projects second (European D...
Eugenio Minardi
 
PDF
Architettura e visualizzazione dei dati in Drupal
Eugenio Minardi
 
PDF
The benefits of an elastic infrastructure on a Drupal e-commerce (European Dr...
Eugenio Minardi
 
Come sfruttare tutte le potenzialità di Symfony in Drupal 8
Eugenio Minardi
 
Drupal Platform first Design
Eugenio Minardi
 
Migrare siti web
Eugenio Minardi
 
Creazione di un modulo per la gestione delle password
Eugenio Minardi
 
Angular JS - Javascript framework for superheroes
Eugenio Minardi
 
Another Copernican Revolution: maintenance first, projects second (European D...
Eugenio Minardi
 
Architettura e visualizzazione dei dati in Drupal
Eugenio Minardi
 
The benefits of an elastic infrastructure on a Drupal e-commerce (European Dr...
Eugenio Minardi
 
Ad

Similar to MongoDB: What, why, when (20)

PPTX
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
David Peyruc
 
PPTX
MongoDB Days Silicon Valley: Jumpstart: The Right and Wrong Use Cases for Mon...
MongoDB
 
PPTX
MonogDB Admin 101 - MonogDBDays Munich
Marc Schwering
 
PPTX
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
PPTX
Webinar: General Technical Overview of MongoDB for Ops Teams
MongoDB
 
PPTX
Conceptos básicos. Seminario web 1: Introducción a NoSQL
MongoDB
 
PPTX
Agility and Scalability with MongoDB
MongoDB
 
PPTX
MongoDB
fsbrooke
 
PDF
Mongo db transcript
foliba
 
PPTX
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
PDF
MongoDB - Riviera Dev 2018
Maxime Beugnet
 
ODP
Front Range PHP NoSQL Databases
Jon Meredith
 
PPTX
Data Treatment MongoDB
Norberto Leite
 
PPTX
Webinar: Getting Started with MongoDB - Back to Basics
MongoDB
 
KEY
MongoDB
Steven Francia
 
PDF
MongoDB: Advantages of an Open Source NoSQL Database
FITC
 
PPTX
Python Ireland Conference 2016 - Python and MongoDB Workshop
Joe Drumgoole
 
PPTX
Tim Marston.
PatrickCrompton
 
PPTX
mongoDB: Driving a data revolution
MongoDB
 
PPTX
Tim marston
PatrickCrompton
 
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
David Peyruc
 
MongoDB Days Silicon Valley: Jumpstart: The Right and Wrong Use Cases for Mon...
MongoDB
 
MonogDB Admin 101 - MonogDBDays Munich
Marc Schwering
 
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
Webinar: General Technical Overview of MongoDB for Ops Teams
MongoDB
 
Conceptos básicos. Seminario web 1: Introducción a NoSQL
MongoDB
 
Agility and Scalability with MongoDB
MongoDB
 
MongoDB
fsbrooke
 
Mongo db transcript
foliba
 
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
MongoDB - Riviera Dev 2018
Maxime Beugnet
 
Front Range PHP NoSQL Databases
Jon Meredith
 
Data Treatment MongoDB
Norberto Leite
 
Webinar: Getting Started with MongoDB - Back to Basics
MongoDB
 
MongoDB: Advantages of an Open Source NoSQL Database
FITC
 
Python Ireland Conference 2016 - Python and MongoDB Workshop
Joe Drumgoole
 
Tim Marston.
PatrickCrompton
 
mongoDB: Driving a data revolution
MongoDB
 
Tim marston
PatrickCrompton
 
Ad

More from Eugenio Minardi (20)

PDF
Delphi and ExtJS (26 ottobre 2017)
Eugenio Minardi
 
PDF
ExtJS: La piattaforma vincente (tools)
Eugenio Minardi
 
PDF
ExtJS: La piattaforma vincente (multiple screens)
Eugenio Minardi
 
PDF
ExtJS: La piattaforma vincente (rich UI)
Eugenio Minardi
 
PDF
ExtJS: La piattaforma vincente (class system)
Eugenio Minardi
 
PDF
ExtJS: La piattaforma vincente
Eugenio Minardi
 
PDF
Distributed Team Management: 
Pitfall, Challenges and Advantages
Eugenio Minardi
 
PDF
A Practical Introduction to Symfony (European Drupal Days 2015)
Eugenio Minardi
 
PDF
UN World Food Programme Standards & Best Practises (European Drupal Days 2015)
Eugenio Minardi
 
PDF
Drupal theming - a practical approach (European Drupal Days 2015)
Eugenio Minardi
 
PDF
Optimizing MariaDB for Web Applications (European Drupal Days 2015)
Eugenio Minardi
 
PDF
PhpStorm for Drupal Development (European Drupal Days 2015)
Eugenio Minardi
 
PDF
Drupal Continuous Integration (European Drupal Days 2015)
Eugenio Minardi
 
PDF
Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)
Eugenio Minardi
 
PDF
The multilingual Drupal 8 experience (European Drupal Days 2015)
Eugenio Minardi
 
PDF
Drupal Security: How to survive Drupalgeddon and prepare for future (European...
Eugenio Minardi
 
PDF
Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)
Eugenio Minardi
 
PDF
Secure Drupal, from start to finish (European Drupal Days 2015)
Eugenio Minardi
 
PDF
Bridging the gap between business and technology - Behaviour Driven Developme...
Eugenio Minardi
 
PDF
Drupal for Big Data - is it ready? (European Drupal Days 2015)
Eugenio Minardi
 
Delphi and ExtJS (26 ottobre 2017)
Eugenio Minardi
 
ExtJS: La piattaforma vincente (tools)
Eugenio Minardi
 
ExtJS: La piattaforma vincente (multiple screens)
Eugenio Minardi
 
ExtJS: La piattaforma vincente (rich UI)
Eugenio Minardi
 
ExtJS: La piattaforma vincente (class system)
Eugenio Minardi
 
ExtJS: La piattaforma vincente
Eugenio Minardi
 
Distributed Team Management: 
Pitfall, Challenges and Advantages
Eugenio Minardi
 
A Practical Introduction to Symfony (European Drupal Days 2015)
Eugenio Minardi
 
UN World Food Programme Standards & Best Practises (European Drupal Days 2015)
Eugenio Minardi
 
Drupal theming - a practical approach (European Drupal Days 2015)
Eugenio Minardi
 
Optimizing MariaDB for Web Applications (European Drupal Days 2015)
Eugenio Minardi
 
PhpStorm for Drupal Development (European Drupal Days 2015)
Eugenio Minardi
 
Drupal Continuous Integration (European Drupal Days 2015)
Eugenio Minardi
 
Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)
Eugenio Minardi
 
The multilingual Drupal 8 experience (European Drupal Days 2015)
Eugenio Minardi
 
Drupal Security: How to survive Drupalgeddon and prepare for future (European...
Eugenio Minardi
 
Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)
Eugenio Minardi
 
Secure Drupal, from start to finish (European Drupal Days 2015)
Eugenio Minardi
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Eugenio Minardi
 
Drupal for Big Data - is it ready? (European Drupal Days 2015)
Eugenio Minardi
 

Recently uploaded (20)

PDF
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
PDF
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
PPTX
Slides pptx: World Game's Eco Economic Epochs.pptx
Steven McGee
 
PPTX
The Latest Scam Shocking the USA in 2025.pptx
onlinescamreport4
 
PDF
Cybersecurity Awareness Presentation ppt.
banodhaharshita
 
PPTX
Different Generation Of Computers .pptx
divcoder9507
 
PDF
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
PPTX
AI at Your Side: Boost Impact Without Losing the Human Touch (SXSW 2026 Meet ...
maytaldahan
 
PPTX
MSadfadsfafdadfccadradfT_Presentation.pptx
pahalaedward2
 
PDF
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
PPTX
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
How Much GB RAM Do You Need for Coding? 5 Powerful Reasons 8GB Is More Than E...
freeshopbudget
 
PDF
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
PPTX
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PDF
Paper PDF: World Game (s) Great Redesign.pdf
Steven McGee
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
Pengenalan perangkat Jaringan komputer pada teknik jaringan komputer dan tele...
Prayudha3
 
PPT
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
Slides pptx: World Game's Eco Economic Epochs.pptx
Steven McGee
 
The Latest Scam Shocking the USA in 2025.pptx
onlinescamreport4
 
Cybersecurity Awareness Presentation ppt.
banodhaharshita
 
Different Generation Of Computers .pptx
divcoder9507
 
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
AI at Your Side: Boost Impact Without Losing the Human Touch (SXSW 2026 Meet ...
maytaldahan
 
MSadfadsfafdadfccadradfT_Presentation.pptx
pahalaedward2
 
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
How Much GB RAM Do You Need for Coding? 5 Powerful Reasons 8GB Is More Than E...
freeshopbudget
 
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
Paper PDF: World Game (s) Great Redesign.pdf
Steven McGee
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
Pengenalan perangkat Jaringan komputer pada teknik jaringan komputer dan tele...
Prayudha3
 
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 

MongoDB: What, why, when

  • 2. Who Am I? • Solutions Architect/Evangelist in MongoDB Inc. • 24 years of experience in databases and software development • Former MySQL employee • Previous life: web,web,web
  • 4. Understanding Big Data – It’s Not Very“Big” from Big Data Executive Summary – 50+ top executives from Government and F500 firms 64% - Ingest diverse, new data in real-time 15% - More than 100TB of data 20% - Less than 100TB (average of all? <20TB)
  • 5. “I have not failed. I've just found 10,000 ways that won't work.” ― Thomas A. Edison
  • 6. Back in 1970…Cars Were Great!
  • 7. Lots of Great Innovations Since 1970
  • 8. Would you use these technologies for your business today?
  • 10. For which computers the relational model has been designed for?
  • 13. RDBMS Makes Development Hard Relational Database Object Relational Mapping Application Code XML Config DB Schema
  • 14. And Even Harder To Iterate New Table New Table New Column Name Pet Phone Email New Column 3 months later…
  • 15. RDBMS From Complexity to Simplicity MongoDB { _id : ObjectId("4c4ba5e5e8aabf3"), employee_name: "Dunham, Justin", department : "Marketing", title : "Product Manager, Web", report_up: "Neray, Graham", pay_band: “C", benefits : [ { type : "Health", plan : "PPO Plus" }, { type : "Dental", plan : "Standard" } ] }
  • 16. MongoDB The leading NoSQL database Document Database Open- Source General Purpose
  • 17. 7,000,000+ MongoDB Downloads 150,000+ Online Education Registrants 25,000+ MongoDB User Group Members 25,000+ MongoDB DaysAttendees 20,000+ MongoDB Management Service (MMS) Users Global Community
  • 18. To provide the best database for how we build and run apps today MongoDB Vision Build – New and complex data – Flexible – New languages – Faster development Run – Big Data scalability – Real-time – Commodity hardware – Cloud
  • 19. Enterprise Big Data Stack EDWHadoop Management&Monitoring Security&Auditing RDBMS CRM, ERP, Collaboration, Mobile, BI OS & Virtualization, Compute, Storage, Network RDBMS Applications Infrastructure Data Management Online Data Offline Data
  • 22. Key → Value • One-dimensional storage • Single value is a blob • Query on key only • No schema • Value cannot be updated,only replaced Key Blob
  • 23. Relational/Wide Column • Two-dimensional storage (tuples) • Each field contains a single value • Query on anyfield • Very structured schema (table) • In-place updates • Normalization process requires many tables, joins, indexes,and poor data locality Primary Key
  • 24. Document • N-dimensional storage • Each field can contain 0,1, many,or embedded values • Query on anyfield & level • Flexible schema • Inline updates * • Embedding related data has optimal data locality, requires fewer indexes,has better performance _id
  • 25. Document Data Model Relational MongoDB { first_name: ‘Paul’, surname: ‘Miller’, city: ‘London’, location: [45.123,47.232], cars: [ { model: ‘Bentley’, year: 1973, value: 100000, … }, { model: ‘Rolls Royce’, year: 1965, value: 330000, … } ] }
  • 26. Document Model Benefits • Agility and flexibility – Data models can evolve easily – Companies can adapt to changes quickly • Intuitive,natural data representation – Developers are more productive – Manytypes of applications are a good fit • Reduces the need for joins,disk seeks – Programming is more simple – Performance can be delivered at scale
  • 27. Developers are more productive
  • 28. Developers are more productive
  • 29. Automatic Sharding • Three types of sharding: hash-based, range-based, tag- aware! • Increase or decrease capacity as you go! • Automatic balancing
  • 30. Query Routing • Multiple query optimization models! • Each sharding option appropriate for different apps!
  • 31. HighAvailability–Ensure application availabilityduring many types of failures ! Disaster Recovery–Address the RTO and RPO goals for business continuity ! Maintenance –Perform upgrades and other maintenance operations with no application downtime Availability Considerations
  • 32. Replica Sets • Replica Set – two or more copies! • “Self-healing” shard! • Addresses many concerns:! - High Availability! - Disaster Recovery! - Maintenance
  • 35. Write Concern • Network acknowledgement • Wait for error • Wait for journal sync • Wait for replication
  • 40. Tagging • Control where data is written to,and read from • Each member can have one or more tags – tags: {dc:"ny"} – tags: {dc:"ny",
 subnet:"192.168",
 rack:"row3rk7"} • Replica set defines rules for write concerns • Rules can change without changing app code
  • 41. {! _id : "mySet",! members : [! {_id : 0, host : "A", tags : {"dc": "ny"}},! {_id : 1, host : "B", tags : {"dc": "ny"}},! {_id : 2, host : "C", tags : {"dc": "sf"}},! {_id : 3, host : "D", tags : {"dc": "sf"}},! {_id : 4, host : "E", tags : {"dc": "cloud"}}],! settings : {! getLastErrorModes : {! allDCs : {"dc" : 3},! someDCs : {"dc" : 2}} }! }! > db.blogs.insert({...})! > db.runCommand({getLastError : 1, w : "someDCs"}) Tagging Example
  • 42. Wait for Replication (Tagging)
  • 43. Read Preference Modes • 5 modes – primary(only)-Default – primaryPreferred – secondary – secondaryPreferred – Nearest ! When more than one node is possible,closest node is used for reads (all modes but primary)
  • 44. Single Data Center • Automated failover ! • Tolerates server failures! • Tolerates rack failures! • Number of replicas defines failure tolerance Primary –A Primary – B Primary – C Secondary –A Secondary –ASecondary – B Secondary – BSecondary – CSecondary – C
  • 45. Active/Standby Data Center • Tolerates server and rack failure! • Standby data center Data Center - West Primary –A Primary – B Primary – C Secondary –ASecondary – B Secondary – C Data Center - East Secondary –A Secondary – B Secondary – C
  • 46. Active/Active Data Center • Tolerates server, rack, data center failures, network partitions Data Center - West Primary –A Primary – B Primary – C Secondary –A Secondary – BSecondary – C Data Center - East Secondary –A Secondary – B Secondary – C Secondary – B Secondary – C Secondary –A Data Center - Central Arbiter –A Arbiter – B Arbiter – C
  • 47. Global Data Distribution Real-time Real-time Real-time Real-time Real-time Real-time Real-time Primary Secondary Secondary Secondary Secondary Secondary Secondary Secondary
  • 50. High Volume Data Feeds ••More machine forms, sensors & data ••Variably structured Machine Generated Data ••High frequency trading ••Daily closing price Securities Data ••Multiple data sources ••Each changes their format consistently ••Student Scores, ISP logs Social Media / General Public
  • 51. Operational Intelligence ••Large volume of users ••Very strict latency requirements ••Sentiment Analysis Ad Targeting ••Expose data to millions of customers ••Reports on large volumes of data ••Reports that update in real time Real time dashboards ••Join the conversation ••Catered Games ••Customized Surveys Social Media Monitoring
  • 52. Metadata ••Diverse product portfolio ••Complex querying and filtering ••Multi-faceted product attributes Product Catalogue ••Data mining ••Call records ••Insurance Claims Data analysis ••Retina Scans ••Fingerprints Biometric
  • 53. Content Management ••Comments and user generated content ••Personalization of content and layout News Site ••Generate layout on the fly ••No need to cache static pages Multi-device rendering ••Store large objects ••Simpler modeling of metadata Sharing