SlideShare a Scribd company logo
My Life With
MongoDB
Mitch Pirtle, Miami MongoDB User Group
February 2015
Before we get started.
Your MongoDB Fu?
Happy to show you how WiredTiger can be optimized
I got multiple apps in production with it
Currently using it in active development/projects
Hey I downloaded it at least, might even install it
Got donuts?
All righty then!
Now a little about me.
Recovering Joomla! founder
Starting companies since 1995
Big on PHP, Node, Go, cloud tools, virtualization, containers
Big on developer workflow
Coach youth sports
Proud husband, dad
Don’t even THINK about touching my BBQ
Hey Ed, how much time do I got?
In the beginning…
We needed to store data
Data needed to be kept clean
Disk space was at a premium
Same for CPU and RAM
Efficiency was the most important factor
Life was good.
- Al Gore, supposedly
“Hey boys, check it out, the
Internets!”
Number of concurrent users grew
Amount of data grew
Programming languages proliferated
Applications accessing our data proliferated
We all switched to Oracle or DB2
Hey what was that sound?
Arrival of the World Wide Web
Concurrent users jumped from 2 to 2,000,000
1,200 daily accesses turned into 20MM daily views
Throughput became the only critical element for your
apps, and therefore your data
That smoking crater in the datacenter? Yeah, that was
your DATABASE SERVER.
Something else was
happening, too.
Programming languages
Perl, Python, Ruby, Java, PHP, and more
All used objects to represent structures
All were connected to relational databases
Which required…
The Object Relational Mapper (ORM)
Models represented “things”
Each model could be linked to other models
Has many, belongs to, is a member of…
It’s ok, we got this.
Fixes for rapid data growth
Stored procedures
Foreign keys
Triggers
Here comes the World Wide Web!
No, really, we got this.
Fixes for super mega whack-
daddy growth
Sharding
Clustering
Multi-master
Read-only slaves
Replication
Flux Capacitors
Dilithium Crystals
My life with MongoDB
Ok, we don’t got this.
Enter…
–Johnny Developer
“But it’s not ACID compliant!
ZOMGWTFROFLBBQ!!1!”
“Somebody wanted acid?”
– Some Sucker On The Internet
“But somebody on YouTube said it
would lose my data!”
You’re not losing me. I’m a fan favorite.
Main MongoDB goodness
Stores data as JSON documents
Sharding is built in
Clustering is built in
Slaves/replication is built in
Atomic writes, supports verified commits to disk
No JOINs
But how am I going to manage these queries that
reach across umpteen different collections?
Denormalizing your data
Simple top-level schema
Logically driven
Atomic data
Your relational data looked like this.
Your document model looks like this.
Once again, with
feeling.
Relational data.
Document data.
Relational data.
Document data.
Enough already!
User table, relational style
first_name: varchar(128)
last_name: varchar(128)
email: varchar(128)
password: varchar(128)
Seems simple enough.
Right?
Not done yet.
address_id: int (refers to address.id)
gender_id: int (refers to gender.id)
account_type_id: int (refers to account types)
See? I got this all figured out.
I have two addresses.
My life with MongoDB
create_user(user)
Ok first insert the users table
create_user(user)
Ok first insert the users table
No wait, first insert the address and get address.id
create_user(user)
Ok first insert the users table
No wait, first insert the address and get address.id
No, insert users record first, then the address, then
update the users.address_id with the last_insert_id
My life with MongoDB
EXAMPLE: User document
{

_id: “35b3d656-4e4b-41c0-85ab-23a9867a3e00”,

first_name: “Mitch”,

last_name: “Pirtle”,

addresses: [

address_1: “123 Tondup Glacier”,

address_2: “Second Yurt On The Left”,

region: “Lhasa”,

country: “Tibet”

]

}
Yep, that’s all JSON.
My life with MongoDB
Stumbling into MongoDB
Leave your 3NF data model behind
Atomicity is at the DOCUMENT LEVEL
There are different ways of doing things (e.g.
findAndReplace)
“Scuse me while I whip this out.”
[CONSOLE]
Questions?
Thanks!
@mitchitized
http://about.me/mitchitized
http://www.slideshare.net/spacemonkeylabs
https://www.github.com/spacemonkey

More Related Content

What's hot (19)

PPTX
Untangling spring week11
Derek Jacoby
 
PDF
MongoDB and the MEAN Stack
MongoDB
 
PDF
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
Codemotion
 
PPTX
Untangling spring week9
Derek Jacoby
 
PPTX
Node js - Enterprise Class
Glenn Block
 
PDF
Introduction to the MEAN stack
Yoann Gotthilf
 
PPTX
Untangling spring week8
Derek Jacoby
 
PDF
Migrating Edmunds.com to AWS (re:Invent 2013 DMG205)
John Martin
 
PPTX
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
Irfan Maulana
 
PPTX
Javascript Myths and its Evolution
Deepu S Nath
 
PPTX
Real World Windows 8 Apps in JavaScript
Domenic Denicola
 
PPT
BCS Open Source Talk
Dave Cross
 
PDF
Developing realtime apps with Drupal and NodeJS
drupalcampest
 
PDF
Build the mobile web you want
k88hudson
 
PDF
GDI WordPress 1 January 2012
pamselle
 
PPTX
Evolution of java script libraries
Columbia Developers Guild
 
PDF
Building with JavaScript - write less by using the right tools
Christian Heilmann
 
PPTX
PHP Indonesia - Nodejs Web Development
Irfan Maulana
 
PPTX
Untangling the web11
Derek Jacoby
 
Untangling spring week11
Derek Jacoby
 
MongoDB and the MEAN Stack
MongoDB
 
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
Codemotion
 
Untangling spring week9
Derek Jacoby
 
Node js - Enterprise Class
Glenn Block
 
Introduction to the MEAN stack
Yoann Gotthilf
 
Untangling spring week8
Derek Jacoby
 
Migrating Edmunds.com to AWS (re:Invent 2013 DMG205)
John Martin
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
Irfan Maulana
 
Javascript Myths and its Evolution
Deepu S Nath
 
Real World Windows 8 Apps in JavaScript
Domenic Denicola
 
BCS Open Source Talk
Dave Cross
 
Developing realtime apps with Drupal and NodeJS
drupalcampest
 
Build the mobile web you want
k88hudson
 
GDI WordPress 1 January 2012
pamselle
 
Evolution of java script libraries
Columbia Developers Guild
 
Building with JavaScript - write less by using the right tools
Christian Heilmann
 
PHP Indonesia - Nodejs Web Development
Irfan Maulana
 
Untangling the web11
Derek Jacoby
 

Similar to My life with MongoDB (20)

DOCX
MongoDB DOC v1.5
Tharun Srinivasa
 
PDF
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
PPTX
Introduction to MongoDB
MongoDB
 
PDF
Building Apps with MongoDB
Nate Abele
 
PDF
MongoDB.pdf
KuldeepKumar778733
 
PDF
Building your first app with mongo db
MongoDB
 
PPT
Tech Gupshup Meetup On MongoDB - 24/06/2016
Mukesh Tilokani
 
PPT
Mongo db basics
Dhaval Mistry
 
PDF
Introduction to MongoDB
Mike Dirolf
 
PPT
Introduction to MongoDB
Ravi Teja
 
PPTX
Intro To Mongo Db
chriskite
 
PPTX
Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
MongoDB
 
PDF
MongoDB Basics
Sarang Shravagi
 
PPTX
MongoDB presentation
Hyphen Call
 
PPTX
MongoDB Internals
Siraj Memon
 
PPT
MongoDB, it's not just about big data
willshulman
 
PDF
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
PPTX
How to learn MongoDB for beginner's
surajkumartpoint
 
PDF
Introduction to MongoDB and its best practices
AshishRathore72
 
MongoDB DOC v1.5
Tharun Srinivasa
 
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
Introduction to MongoDB
MongoDB
 
Building Apps with MongoDB
Nate Abele
 
MongoDB.pdf
KuldeepKumar778733
 
Building your first app with mongo db
MongoDB
 
Tech Gupshup Meetup On MongoDB - 24/06/2016
Mukesh Tilokani
 
Mongo db basics
Dhaval Mistry
 
Introduction to MongoDB
Mike Dirolf
 
Introduction to MongoDB
Ravi Teja
 
Intro To Mongo Db
chriskite
 
Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
MongoDB
 
MongoDB Basics
Sarang Shravagi
 
MongoDB presentation
Hyphen Call
 
MongoDB Internals
Siraj Memon
 
MongoDB, it's not just about big data
willshulman
 
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
How to learn MongoDB for beginner's
surajkumartpoint
 
Introduction to MongoDB and its best practices
AshishRathore72
 
Ad

More from Mitch Pirtle (20)

PDF
Cloudy with a chance of scale
Mitch Pirtle
 
PDF
MongoDB, Node.js, and You: PART III
Mitch Pirtle
 
PDF
MongoDB, Node.js And You: PART II
Mitch Pirtle
 
PDF
MongoDB, Development and You
Mitch Pirtle
 
PDF
Cloud conference - mongodb
Mitch Pirtle
 
KEY
Unified Content Model and Joomla!
Mitch Pirtle
 
KEY
Gridfs and MongoDB
Mitch Pirtle
 
KEY
Joomla - an Overview
Mitch Pirtle
 
KEY
Operational MongoDB
Mitch Pirtle
 
KEY
Joomla Extreme Performance
Mitch Pirtle
 
KEY
Joomla and MongoDB
Mitch Pirtle
 
PDF
Mongodb and Totsy: An e-commerce case study
Mitch Pirtle
 
KEY
Mongodb and Totsy - E-commerce Case Study
Mitch Pirtle
 
KEY
PHP, Lithium and MongoDB
Mitch Pirtle
 
KEY
Content Management Systems and MongoDB
Mitch Pirtle
 
KEY
MongoDB: Built for Speed
Mitch Pirtle
 
KEY
Content Mangement Systems and MongoDB
Mitch Pirtle
 
KEY
Joomla For Entrepreneurs
Mitch Pirtle
 
KEY
Thin Server Architecture
Mitch Pirtle
 
KEY
Developing Joomla! 1.5 Extensions, Explained
Mitch Pirtle
 
Cloudy with a chance of scale
Mitch Pirtle
 
MongoDB, Node.js, and You: PART III
Mitch Pirtle
 
MongoDB, Node.js And You: PART II
Mitch Pirtle
 
MongoDB, Development and You
Mitch Pirtle
 
Cloud conference - mongodb
Mitch Pirtle
 
Unified Content Model and Joomla!
Mitch Pirtle
 
Gridfs and MongoDB
Mitch Pirtle
 
Joomla - an Overview
Mitch Pirtle
 
Operational MongoDB
Mitch Pirtle
 
Joomla Extreme Performance
Mitch Pirtle
 
Joomla and MongoDB
Mitch Pirtle
 
Mongodb and Totsy: An e-commerce case study
Mitch Pirtle
 
Mongodb and Totsy - E-commerce Case Study
Mitch Pirtle
 
PHP, Lithium and MongoDB
Mitch Pirtle
 
Content Management Systems and MongoDB
Mitch Pirtle
 
MongoDB: Built for Speed
Mitch Pirtle
 
Content Mangement Systems and MongoDB
Mitch Pirtle
 
Joomla For Entrepreneurs
Mitch Pirtle
 
Thin Server Architecture
Mitch Pirtle
 
Developing Joomla! 1.5 Extensions, Explained
Mitch Pirtle
 
Ad

Recently uploaded (20)

PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 

My life with MongoDB