The document provides an overview of the speaker's experience with MongoDB and how it has evolved over time to meet growing data and usage demands. It discusses (1) how data storage needs changed from efficiency to throughput, (2) the proliferation of programming languages and object-relational mappers, and (3) MongoDB's features for sharding, clustering, and storing data as JSON documents to address these challenges. The speaker emphasizes leaving behind the 3NF data model and that atomicity is at the document level with MongoDB.
3. 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?
5. 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
10. - Al Gore, supposedly
“Hey boys, check it out, the
Internets!”
11. Number of concurrent users grew
Amount of data grew
Programming languages proliferated
Applications accessing our data proliferated
We all switched to Oracle or DB2
14. 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.
16. Programming languages
Perl, Python, Ruby, Java, PHP, and more
All used objects to represent structures
All were connected to relational databases
Which required…
31. 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
32. But how am I going to manage these queries that
reach across umpteen different collections?
50. 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
51.
52. 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”
]
}
55. 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)