4. Benefits of MongoDB
• Performance
• Availability and Scalability
• Data Model
• Query Model
5. Benefits of MongoDB
Performance
Scalability and Performance
Depth of Functionality
6. Benefits of MongoDB
Performance
Scalability and Performance
Key/Value Stores
Cache Only
Depth of Functionality
7. Benefits of MongoDB
Performance
Scalability and Performance
Key/Value Stores
Depth of Functionality
RDBMS
Cache Only
Highly Transactional
8. Benefits of MongoDB
Performance
Scalability and Performance
Key/Value Stores
MongoDB
Depth of Functionality
RDBMS
Mobile
Content Mgmt. Analytics
Cache Only
Highly Transactional
Internet of Things
Single View
Personalization
Catalog
9. Benefits of MongoDB
Availability and Scalability
Application
mongod
mongod
mongod
10. Benefits of MongoDB
Availability and Scalability
Application
mongod
mongod
mongod
mongod
mongod
mongod
mongos
[A-L] [M-Z]
17. Benefits of MongoDB
{
: ‘Paul’,
surname: ‘Miller’,
cell: ‘+447557505611’
location: [45.123,47.232],
profession: [banking, finance,
trader],
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
]
}
Natural Data Model
Field Names
Typed field values
18. Benefits of MongoDB
{
: ‘Paul’,
surname: ‘Miller’,
cell: ‘+447557505611’
location: [45.123,47.232],
profession: [banking, finance,
trader],
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
]
}
Natural Data Model
Field Names
Typed field values
Fields can
contain arrays
19. Benefits of MongoDB
{
: ‘Paul’,
surname: ‘Miller’,
cell: ‘+447557505611’
location: [45.123,47.232],
profession: [banking, finance,
trader],
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
]
}
Natural Data Model
Field Names
Typed field values
Fields can
contain arrays
} Fields can contain an array
of sub-documents
20. Benefits of MongoDB
Rich Query Model
{
: ‘Paul’,
surname: ‘Miller’,
cell: ‘+447557505611’
location: [45.123,47.232],
profession: [banking, finance,
trader],
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
]
}
Rich
Queries
• Find Paul’s car
• Find everybody in London with a
car built between 1970 and 1980
Geo
• Find all car owners within 10m of
Manhattan
Text Search
• Find all cars whose VIN starts with
ZA1
Aggregation
• Calculate the average value of
Paul’s car collection
Map
Reduce
• What is the ownership pattern of
colors by geography over time? (Is
silver trending up in the US?)
22. Benefits of MongoDB
Relational Database Challenges
• Data Types
• Unstructured data
• Semi-structured data
• Polymorphic data
23. Benefits of MongoDB
Relational Database Challenges
• Data Types
• Unstructured data
• Semi-structured data
• Polymorphic data
• Agile Development
• Iterative
• Short development cycles
• New workloads
24. Benefits of MongoDB
Relational Database Challenges
• Data Types
• Unstructured data
• Semi-structured data
• Polymorphic data
• Agile Development
• Iterative
• Short development cycles
• New workloads
• New Architectures
• Horizontal scaling
• Commodity servers
• Cloud computing
25. Benefits of MongoDB
Relational Database Challenges
• Data Types
• Unstructured data
• Semi-structured data
• Polymorphic data
• Agile Development
• Iterative
• Short development cycles
• New workloads
• Volume of Data
• Petabytes of data
• Trillions of records
• Millions of queries per second
• New Architectures
• Horizontal scaling
• Commodity servers
• Cloud computing
29. Use Case - Single View
• 70+ systems
• 50 million policies
• 118 million customers
• 190 million documents
30. Use Case - Single View
• 70+ systems
• 50 million policies
• 118 million customers
• 190 million documents
31. Use Case - Single View
• 70+ systems
• 50 million policies
• 118 million customers
• 190 million documents
• Rolling out internationally
• A version for its sales force
• Real time prediction of
customer attrition rates.
35. Use Case -Mobile
• 2 million requests per day
• 40 million users w/ alerts
36. Use Case -Mobile
• 2 million requests per day
• 40 million users w/ alerts
• Mobile backend as a service for Facebook
• 270,000+ apps
• Unknown workload types
• API requests growing 500% annually
39. Use Case -Analytics
• Pairs MongoDB-powered analytics with visual maps
• Provides real-time and historical information
• Finds trends and relationships
40. Use Case -Analytics
• Pairs MongoDB-powered analytics with visual maps
• Provides real-time and historical information
• Finds trends and relationships
What’s next? The SmartData Platform
• Predict best ways to cut traffic congestion
• Analyze energy usage trends to improve efficiency
• Map crime stats and city data relationships so crime can actually be reduced
41. Use Case -Analytics
Real Time Analytics
• Light-weight analytics very quickly
• Sub-second response times
• High availability requirements
42. Use Case -Analytics
Real Time Analytics Batch Analytics
• Complex, long-running analyses
• Slower response times (minutes/days)
• Lower availability requirements
• Light-weight analytics very quickly
• Sub-second response times
• High availability requirements
46. Wrong Use Case
• Developer productivity and satisfaction is not a concern for
you
• Limited vertical scalability is a comfort blanket
• “It’s always been done this way”
• You can see the future and know all possibilities for your
schema