Mongodb Introduction: Presenter: John Page
Mongodb Introduction: Presenter: John Page
Technology
Customers Company
Community
Technology
MongoDB.
Drivers
Drivers for most popular Java Ruby
programming languages and
frameworks
JavaScript Perl
Python Haskell
8
MongoDB - Utility
• Complex Indexed Queries
• Aggregation.
• High Availability.
• Auto Sharding.
• Compression of data.
• Lock free access.
• Enterprise Management.
The database landscape.
Key/Value Store
Relational
When MongoDB should be used.
• When you have high speed access to complex objects
• Atomic partial updates.
• Fast Retrieval.
• Secondary Queries. 22 [ 2 , 3, 4,]
• Aggregation capabilities. {
a: 5
bob :
22 [ 2
{ a { e:3}
, 3, 4,]
{
a: 5
bob : { a { e:3}
22 [ 2 , 3, 4,]
{
a: 5
bob : { a { e:3}
Enterprise
MongoDB Overview
21
Customers
MongoDB Use Cases
Big Data Product & Asset Security & Internet of Database-as-a-
Catalogs Fraud Things Service
Top Global Shipping
Company
Top US Retailer
Top Investment and
Top Media Company
Retail Banks
Problem
Problem Solution
Why MongoDB Results
Results
–
Bi-direction matching process did A flexible data model to 95% faster compatibility
not scale on single monolithic seamlessly handle new user matching; matching the
database as the service grew – attributes entire user base takes 12 hrs
running a matching analysis of
the user base was taking 2 The ability to scale on
instead of 2 weeks
weeks, detracting from customer commodity hardware and not
experience add operational overhead to a 30% higher communication
team already managing between prospective
Richer and more complex data thousands of servers partners; 50% increase in
models caused operational paying subscribers; 60%
complexity and downtime as Support for complex, multi- increase in unique web visits
schema changes required a full attribute queries that provide the
database dump and reload foundation of eHarmony’s
compatibility matching system
24
Case Study
Re-inventing eCommerce personalization for over 2 million
users per day
Problem
Problem Solution
Why MongoDB Results
Results
Product catalog with over 2 Flexible data model allowed Otto Products get to market faster
million products took over 12 hrs to quickly iterate data schema for – product catalog update
to update, resulting in stale changes to products, attributes, time reduced to 15 minutes
catalogs and worse customer customer profiles
experiences
from 12 hrs
All site interactions stored in
Site was static, slow and MongoDB to enable Personalized experience for
expensive to change; it could not personalized products, 30m shoppers, resulting in
react quickly to market changes navigation and filters higher customer
engagement, satisfaction
Only small fragments of the site In-memory speed dramatically and revenues
could be changed to personalize improved site response times
the customer experience
25
Case Study
Optimizing performance and reducing costs with tens of
billions of records
Problem
Problem Solution
Why MongoDB Results
Results
Legacy system became too Scale out on inexpensive 10x increase in performance
cumbersome and expensive commodity servers
to manage as data volumes 12 billion docs, growing at 1
reached the 10s of billions Built in redundancy billion docs per year
26
Case Study
Insurance leader generates coveted single view of
customers in 90 days – “The Wall”
Problem
Problem Solution
Why MongoDB Results
Results
27
PHARMACEUTICALS ACCELERATES R&D WITH
MONGODB
Their technology creates a synthetic version of messenger RNA,
which helps create protein in cells. If successful, the proteins
could fight cancer, among other diseases.
Problem
Problem Solution
Why MongoDB Results
Results
Personalization server that acts Dynamic schema for storing New version of
as the ‘master’ storage for variable customer data personalization server was
customer data was originally built built on MongoDB in ¼ the
on Oracle (over 14 months) but it
performed below expectations,
Native fault tolerance and time with ½ the team
did not scale, and cost too much high availability
Performance boosts of more
New performance requirements Official drivers, production than a magnitude, 1/3 the
– 40% more data to be stored, support, and significantly storage requirements
reload entire data warehouse (22 reduced costs
million customers) daily in small Decreased costs and
window – could not be met with increased revenues
Oracle
35
Case Study
Quantitative investment manager with over $11.3 billion in
assets under management invests heavily in new database
AHL needed new Once it was determined that MongoDB was 100x faster in
technologies to be more MongoDB could significantly retrieving data
agile and gain competitive improve operations, the
advantages in the systematic database was embraced for Tick Data: Quickly scaled to
trading space a number of applications, 250 million ticks per second,
replacing RDBMS a 25x improvement in tick
throughput
Faster data retrieval; faster
compute times; better Cut disk storage 60%, and
throughput for tick data realized 40x cost savings by
using commodity SSDs
36
Relational Database Challenges
Relational Database Challenges
Data Types Agile Development
• Unstructured data • Iterative
• Semi-structured data • Short development
cycles
• Polymorphic data
• New workloads
RDBMS 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" }
]
}
40
Performance
Auto-Sharding
44
Sharding and Replication
MongoDB Architecture
46
MongoDB Architecture
47
MongoDB Architecture
48
Lower Total Cost of Ownership
Developer/Ops Savings
• Ease of Use
• Agile development
• Less maintenance
Hardware Savings
• Commodity servers
• Internal storage (no SAN)
• Scale out, not up
49
70%+ Cost Takeout
56
Case Study
Multi-national banking and financial services firm meets
strict SLAs by replatforming on new technology
Problem
Problem WhySolution
MongoDB Results
Results
57
Case Study
Powering next-generation SaaS for mission-critical
government services in the Netherlands
Problem
Problem WhySolution
MongoDB Results
Results
Brein BV operates in a highly MongoDB manages all the Greatly improved customer
competitive market where each content from government forms experience (Writes are 23x
government tender receives and stores the business rules faster and reads are 12x
responses from multiple vendors; that enable automated workflow
must have competitive and collaboration
faster)
advantage to survive
Dynamic schema brings new Migration to MongoDB
Existing database technology flexibility to the solution happened in 6 months
was not evolving at the pace
needed to keep up with new Multi-node replica set, distributed Platform evolves faster with
trends – online services, always across data centers ensures agile dev enabled by
connected users and businesses always-on availability, critical to dynamic schema
SLAs with customers
58
Case Study
Improving drug discovery tests
59
Case Study
Re-inventing eCommerce personalization for over 2 million
users per day
Problem
Problem WhySolution
MongoDB Results
Results
Product catalog with over 2 Flexible data model allowed Otto Products get to market faster
million products took over 12 hrs to quickly iterate data schema for – product catalog update
to update, resulting in stale changes to products, attributes, time reduced to 15 minutes
catalogs and worse customer customer profiles
experiences
from 12 hrs
All site interactions stored in
Site was static, slow and MongoDB to enable Personalized experience for
expensive to change; it could not personalized products, 30m shoppers, resulting in
react quickly to market changes navigation and filters higher customer
engagement, satisfaction
Only small fragments of the site In-memory speed dramatically and revenues
could be changed to personalize improved site response times
the customer experience
60
Case Study
Optimizing performance and reducing costs with tens of
billions of records
Problem
Problem WhySolution
MongoDB Results
Results
Legacy system became too Scale out on inexpensive 10x increase in performance
cumbersome and expensive commodity servers
to manage as data volumes 12 billion docs, growing at 1
reached the 10s of billions Built in redundancy billion docs per year
61
Case Study
Met new requirements for personalization server serving
over 20 million customers in record time
Problem
Problem WhySolution
MongoDB Results
Results
Personalization server that acts Dynamic schema for storing New version of
as the ‘master’ storage for variable customer data personalization server was
customer data was originally built built on MongoDB in ¼ the
on Oracle (over 14 months) but it
performed below expectations,
Native fault tolerance and time with ½ the team
did not scale, and cost too much high availability
Performance boosts of more
New performance requirements Official drivers, production than a magnitude, 1/3 the
– 40% more data to be stored, support, and significantly storage requirements
reload entire data warehouse (22 reduced costs
million customers) daily in small Decreased costs and
window – could not be met with increased revenues
Oracle
62
Case Study
Keeping costs low while serving over 6 billion images to
millions of customers
Problem
Problem WhySolution
MongoDB Results
Results
63
Case Study
Airline improves customer experience with optimized seat
re-assigning system
Problem
Problem WhySolution
MongoDB Results
Results
64