際際滷

際際滷Share a Scribd company logo
HOW I LEARNED TO
   STOP WORRYING AND
LOVE THE DOCUMENT STORE
       COREY EHMKE
IN A PREVIOUS LIFE...


BUILDING A PPC LANDING PAGE HOSTING PLATFORM

INTERACTION-LEVEL ANALYTICS

A/B AND MULTIVARIATE TESTING

DYNAMIC PAGE CONTENT

REQUIREMENT FOR REAL-TIME REPORTING
DOES THIS SOUND FAMILIAR?


MODELS CONSTANTLY EVOLVING IN RESPONSE TO ILL-
DEFINED REQUIREMENTS AND CHANGING NEEDS

POLYMORPHIC REPRESENTATIONS OF USER
INTERACTIONS

VERSIONING TO SUPPORT MULTIVARIATE TESTING
REQUIREMENTS

NEED TO QUICKLY SCALE UP IN RESPONSE TO DEMAND
ACTIVE RECORD:
      THE WRONG HAMMER


BIG DATA = PAINFUL MIGRATIONS

RAKE TASKS TO MANAGE DATA TRANSFORMATIONS

SINGLE TABLE INHERITANCE NIGHTMARE

CHALLENGE OF SCALING UP A SQL DATABASE
JAMIE ZAWINSKI



YOU NEVER KNOW WHAT THE DESIGN IS
    UNTIL THE PROGRAM IS DONE.
IN SHORT...



   ACTIVE RECORD AND SQL
JUST DONT FEEL AGILE ENOUGH.
MONGODB TO THE RESCUE


DOCUMENT MODEL ALLOWS FOR THE EASY ADDITION OF
NEW FIELDS

EMBEDDED COLLECTIONS

BUILT-IN VERSIONING

MAP REDUCE FOR FAST DATA AGGREGATION

SCALING IS EASY
THE DESIGN PHILOSOPHY



DATA MODELS SHOULD BE EASY TO CODE, EASY TO
MANAGE, AND HIGHLY PERFORMANT

DATABASES SHOULD BE ABLE TO SCALE
HORIZONTALLY WITH EASE
STRENGTHS



FLEXIBILITY

  JSON-LIKE DOCUMENT STORAGE

  SUPPORT FOR NATIVE TYPES

  SCHEMA-LESS
STRENGTHS



POWER

 DYNAMIC QUERIES

 UPSERTS

 EASY AGGREGATION VIA MAP-REDUCE
STRENGTHS



SPEED

 NO JOINS!

 AUTO-SHARDING TO INCREASE CAPACITY WITHOUT
 DOWNTIME
WEAKNESSES



LACK OF MATURE GUI TOOLS

NO FINE-GRAINED TUNING

NO MULTI-DOCUMENT TRANSACTIONS
PRACTICAL CONSIDERATIONS


STOP THINKING IN TABLES, START THINKING IN
DOCUMENTS

EMBEDDED COLLECTIONS, BUT USE CAREFULLY

FULLY CAPABLE OF TRADITIONAL RELATIONS

NO SCHEMAS, NO MIGRATIONS

NO SQL (USE JAVASCRIPT)
MONGOID


MY OBJECT-DOCUMENT-MAPPER (ODM) OF CHOICE

ACTIVEMODEL MAKES MONGOID DOCUMENTS
FIRST-CLASS CITIZENS IN RAILS

PARTIAL UPDATES (CHANGED FIELDS ONLY)

CHAINABLE, LAZY-EVALUATED QUERIES VIA CRITERIA
MONGODB AT TRUNK CLUB
NO SCHEMA, NO MIGRATIONS
NICE QUERY YOU HAVE THERE
OPERATORS IN SCOPES
EMBED THOSE PUPPIES
DOES THIS LOOK FAMILIAR?
HELL YEAH PERFORMANCE


1,000,000 DOCUMENTS

2.93 GHZ IMAC WITH 8GB RAM

MODEL#CREATE: 2,392 / SECOND

MODEL#UPDATE_ATTRIBUTE: 2,945 / SECOND

MODEL.ALL#EACH: 2,325 / SECOND
EVERYTHING JUST WORKS


SCOPES

CALLBACKS

REFERENCED RELATIONS

OBSERVERS

VALIDATIONS

INDEXES
USE CASES

BIG DATA
(LOGS, ANYONE?)

COMPLEX QUERIES
(MAP REDUCE IS YOUR FRIEND)

RAPIDLY EVOLVING MODELS

LIBERAL USE OF JSON

RELATIONS THAT WANT TO BE EMBEDDED
(E.G. ORDERS <=> LINE ITEMS)
DONT USE IT IF...


YOURE WORKING WITH COMPLEX TRANSACTIONS

YOURE WORKING WITH MISSION-CRITICAL DATA

YOU ENJOY WRITING RAW SQL

YOU NEED TO QUICKLY PULL DATA OUT INTO A CSV

YOURE AFRAID OF NEW THINGS
Ad

Recommended

Dancing about architecture
Dancing about architecture
Coraline Ehmke
Katy perry
Katy perry
CoralRoach
Con cu叩l me quedo
Jaime Marcos
AURKEZPENAK
AURKEZPENAK
gurezikloa
Gasto energ辿tico total seg炭n actividad f鱈sica
Jaime Marcos
My media
My media
CoralRoach
Smartbin Manual 2015 Edition
Smartbin Manual 2015 Edition
Arijit Mitra
Smartbin Manual 2014
Smartbin Manual 2014
Arijit Mitra
Pechugas de pollo con espinacas y queso
Jaime Marcos
Multiple intelligences and education
Multiple intelligences and education
citra wahyu volindri
Qu辿 hay en la etiqueta
Jaime Marcos
Introductions to smartbins
Introductions to smartbins
Arijit Mitra
Smartbin Manual 2016
Smartbin Manual 2016
Arijit Mitra
El trivial de los alimentos
Jaime Marcos
Dell supply chain management
Dell supply chain management
Giridhar sonti
Reliance presentation
Reliance presentation
Giridhar sonti
How to Get Started with Your MongoDB Pilot Project
How to Get Started with Your MongoDB Pilot Project
DATAVERSITY
No SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability Meetup
Hyderabad Scalability Meetup
MongoDB Workshop
MongoDB Workshop
eagerdeveloper
Mongodbworkshop I: get started
Mongodbworkshop I: get started
Vivian S. Zhang
Webinar: ditch Oracle NOW: Best Practices for Migrating to MongoDB
Webinar: ditch Oracle NOW: Best Practices for Migrating to MongoDB
MongoDB
Webinar: Migrating from RDBMS to MongoDB
Webinar: Migrating from RDBMS to MongoDB
MongoDB
mongo db EMERSON EDUARDO RODRIGUES
mongo db EMERSON EDUARDO RODRIGUES
EMERSON EDUARDO RODRIGUES
Mongo DB
Mongo DB
Tata Consultancy Services
La nuova architettura di classe enterprise
La nuova architettura di classe enterprise
MongoDB
Nosql part1 8th December
Nosql part1 8th December
Ruru Chowdhury
Data Modeling for NoSQL
Data Modeling for NoSQL
Tony Tam
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
DATAVERSITY
Data_Modeling_MongoDB.pdf
Data_Modeling_MongoDB.pdf
jill734733

More Related Content

Viewers also liked (9)

Smartbin Manual 2014
Smartbin Manual 2014
Arijit Mitra
Pechugas de pollo con espinacas y queso
Jaime Marcos
Multiple intelligences and education
Multiple intelligences and education
citra wahyu volindri
Qu辿 hay en la etiqueta
Jaime Marcos
Introductions to smartbins
Introductions to smartbins
Arijit Mitra
Smartbin Manual 2016
Smartbin Manual 2016
Arijit Mitra
El trivial de los alimentos
Jaime Marcos
Dell supply chain management
Dell supply chain management
Giridhar sonti
Reliance presentation
Reliance presentation
Giridhar sonti
Smartbin Manual 2014
Smartbin Manual 2014
Arijit Mitra
Pechugas de pollo con espinacas y queso
Jaime Marcos
Multiple intelligences and education
Multiple intelligences and education
citra wahyu volindri
Qu辿 hay en la etiqueta
Jaime Marcos
Introductions to smartbins
Introductions to smartbins
Arijit Mitra
Smartbin Manual 2016
Smartbin Manual 2016
Arijit Mitra
El trivial de los alimentos
Jaime Marcos
Dell supply chain management
Dell supply chain management
Giridhar sonti
Reliance presentation
Reliance presentation
Giridhar sonti

Similar to How I Learned to Stop Worrying and Love the Document Store (20)

How to Get Started with Your MongoDB Pilot Project
How to Get Started with Your MongoDB Pilot Project
DATAVERSITY
No SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability Meetup
Hyderabad Scalability Meetup
MongoDB Workshop
MongoDB Workshop
eagerdeveloper
Mongodbworkshop I: get started
Mongodbworkshop I: get started
Vivian S. Zhang
Webinar: ditch Oracle NOW: Best Practices for Migrating to MongoDB
Webinar: ditch Oracle NOW: Best Practices for Migrating to MongoDB
MongoDB
Webinar: Migrating from RDBMS to MongoDB
Webinar: Migrating from RDBMS to MongoDB
MongoDB
mongo db EMERSON EDUARDO RODRIGUES
mongo db EMERSON EDUARDO RODRIGUES
EMERSON EDUARDO RODRIGUES
Mongo DB
Mongo DB
Tata Consultancy Services
La nuova architettura di classe enterprise
La nuova architettura di classe enterprise
MongoDB
Nosql part1 8th December
Nosql part1 8th December
Ruru Chowdhury
Data Modeling for NoSQL
Data Modeling for NoSQL
Tony Tam
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
DATAVERSITY
Data_Modeling_MongoDB.pdf
Data_Modeling_MongoDB.pdf
jill734733
Relationships are hard
Relationships are hard
ColdFusionConference
MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
Which Questions We Should Have
Which Questions We Should Have
Oracle Korea
Webinar: How MongoDB is making Government Better, Faster, Smarter
Webinar: How MongoDB is making Government Better, Faster, Smarter
MongoDB
MongoDB Basics
MongoDB Basics
Sarang Shravagi
NoSql Brownbag
NoSql Brownbag
Sandeep Kumar
DMDW Extra Lesson - NoSql and MongoDB
DMDW Extra Lesson - NoSql and MongoDB
Johannes Hoppe
How to Get Started with Your MongoDB Pilot Project
How to Get Started with Your MongoDB Pilot Project
DATAVERSITY
No SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability Meetup
Hyderabad Scalability Meetup
Mongodbworkshop I: get started
Mongodbworkshop I: get started
Vivian S. Zhang
Webinar: ditch Oracle NOW: Best Practices for Migrating to MongoDB
Webinar: ditch Oracle NOW: Best Practices for Migrating to MongoDB
MongoDB
Webinar: Migrating from RDBMS to MongoDB
Webinar: Migrating from RDBMS to MongoDB
MongoDB
La nuova architettura di classe enterprise
La nuova architettura di classe enterprise
MongoDB
Nosql part1 8th December
Nosql part1 8th December
Ruru Chowdhury
Data Modeling for NoSQL
Data Modeling for NoSQL
Tony Tam
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
DATAVERSITY
Data_Modeling_MongoDB.pdf
Data_Modeling_MongoDB.pdf
jill734733
MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0
Mike Dirolf
Which Questions We Should Have
Which Questions We Should Have
Oracle Korea
Webinar: How MongoDB is making Government Better, Faster, Smarter
Webinar: How MongoDB is making Government Better, Faster, Smarter
MongoDB
DMDW Extra Lesson - NoSql and MongoDB
DMDW Extra Lesson - NoSql and MongoDB
Johannes Hoppe
Ad

Recently uploaded (20)

Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
Wenn alles versagt - IBM Tape sch端tzt, was z辰hlt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape sch端tzt, was z辰hlt! Und besonders mit dem neust...
Josef Weingand
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
ICT Frame Magazine Pvt. Ltd.
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
Wenn alles versagt - IBM Tape sch端tzt, was z辰hlt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape sch端tzt, was z辰hlt! Und besonders mit dem neust...
Josef Weingand
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
ICT Frame Magazine Pvt. Ltd.
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
Ad

How I Learned to Stop Worrying and Love the Document Store