Why Teams call analytics are critical to your entire business
Building a Cross Channel Content Delivery Platform with MongoDB
1. Building a Cross Channel Content Delivery
Platform with MongoDB
Webinar Building a Cross Channel Content Delivery Platform with MongoDB will begin
at 6:00 AM EDT / 4:00 AM PDT / 11:00 AM UTC
Audio should start immediately when you log into the event via Audio
Broadcast. You will need a Voip headset and reliable internet
connection for Audio Broadcast. If you are having issues connecting,
please dial 1-877-668-4493; Access code: 666 687 901.
There is a Q&A following the webinar.
A recording of the webinar will be available 24 hours after the
event is complete.
2. 10gen Overview
10gen is the
company
behind
MongoDB –
the leading
NoSQL
database
2
12. So What?
1. Slow onboard of each channel
due to complex schema changes.
2. Unable to scale database to
understand our customer!
3. Reduce in user experience due
to performance
12
25. Example - twitter
db.tweets.aggregate(
{$match:
{"user.friends_count": { $gt: 0 },
Predicate
"user.followers_count": { $gt: 0 }
}
},
{$project: Parts of the
{ location: "$user.location",
friends: "$user.friends_count", document you
followers: "$user.followers_count" want to project
}
},
{$group:
{_id: "$location",
friends: {$sum: "$friends"},
followers: {$sum: "$followers"}
}
}
);
25
26. Example - twitter
db.tweets.aggregate(
{$match: Predicate
{"user.friends_count": { $gt: 0 },
"user.followers_count": { $gt: 0 }
}
},
{$project:
{ location: "$user.location",
Parts of the
friends: "$user.friends_count", document you
followers: "$user.followers_count" want to project
}
},
{$group:
{_id: "$location",
friends: {$sum: "$friends"}, Function to apply
followers: {$sum: "$followers"}
} to the result set
}
);
26
37. Operating System map files on the
Filesystem to Virtual Memory
• 200 gigs of MongoDB files creates 200 gigs
of virtual memory
• OS controls what data in RAM
• When a piece of data isn't found in memory
– OS goes to disk to fetch the data
• Indexes are part of the Regular Database files
• Deployment Trick: Pre-Warm your Database
(PreWarming your cache) to prevent cold
38. A Few Words on OS Choice
• For production: Use a 64 bit OS and a 64 bit
MongoDB Build
– 32 Bit has a 2 gig limit; imposed by the operating
systems for memory mapped files
– Clients can be 32 bit
• MongoDB Supports (little endian only)
– Linux, FreeBSD, OS X (on Intel, not PowerPC)
– Windows
– Solaris (Intel only, Joyent offers a cloud service
which works for Mongo)
39. Sharding for caching
96 GB Mem
3:1 Data/Mem
a-i
300 GB Data
j-r
shard01
s-z
300 GB
39
40. Aggregate Horizontal Resources
96 GB Mem 96 GB Mem 96 GB Mem
1:1 Data/Mem 1:1 Data/Mem 1:1 Data/Mem
a-i j-r s-z
300 GB Data
j-r shard02 shard03
s-z
100 GB 100 GB 100 GB
40
41. Sharding Features
• Shard data without no downtime
• Automatic balancing as data is written
• Commands routed (switched) to correct node
• Inserts - must have the Shard Key
• Updates - can have the Shard Key
• Queries
• With Shard Key - routed to nodes
• Without Shard Key - scatter gather
• Indexed / Sorted Queries
• With Shard Key - routed in order
• Without Shard Key - distributed sort merge
41
43. Relational Database Challenges
Data Types Agile Development
• Unstructured data • Iterative
• Semi-structured data • Short development
cycles
• Polymorphic data
• New workloads
Volume of Data New Architectures
• Petabytes of data • Horizontal scaling
• Trillions of records • Commodity servers
• Tens of millions of queries per • Cloud computing
second
43
45. Global MongoDB Community
41,000+
Monthly Unique Downloads
24,000+
Online Education Registrants
12,000+
MongoDB User Group Members
10,000+
Annual MongoDB Days Attendees
47. Questions
• 10Gen Services
– Development Support
– Consultancy
– TAM
– Production Support
• Free online MongoDB
training
– Develop
– Deploy
– Classes start Oct. 2012
47
Editor's Notes
\n
\n
\n
Note: Growth refers to year-to-date revenue based on our fiscal years for 2011 and 2012, i.e., it compares Feb-Oct 2011 (calendar year) to Feb-Oct 2012 (calendar). These figures are unaudited and subject to change.\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Spend time on this slide, even whiteboard the different scenarios for routed versus scatter gather versus distributed sort merge\n