Your SlideShare is downloading. ×
0
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
MongoDB: How it Works
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

MongoDB: How it Works

9,163

Published on

A short deck used as talking points for 10gen's Internals webinar.

A short deck used as talking points for 10gen's Internals webinar.

Published in: Technology
1 Comment
15 Likes
Statistics
Notes
No Downloads
Views
Total Views
9,163
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
265
Comments
1
Likes
15
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide












  • Transcript

    • 1. @mongodb @mdirolf http://www.mongodb.org/
    • 2. How it Works http://www.flickr.com/photos/tmh9/677919415/
    • 3. BSON {“hello”: “bson”} x15 x00 x00 x00 x02 h e l l o x00 x05 x00 x00 x00 b s o n x00 x00 http://bsonspec.org
    • 4. Messages • TCP/IP Wire Protocol • Separate messages for insert, update, query, get_more, delete, etc. http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol
    • 5. Anatomy of an insert use foo; db.test.insert({“hello”: “bson”}); message length request id response id op code (insert) x67x00x00x0 xXXxXXxXX x00x00x00x xd2x07x00x00 0 xXX 00 reserved collection name document(s) x00x00x00x00 f o o . t e s t x00 BSON({“hello”: “bson”}) http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol
    • 6. Memory mapped storage engine
    • 7. Commands db.foo.drop(); = db.foo.runCommand({drop: "foo"}); = db.$cmd.findOne({drop: "foo"}); = db.$cmd.find({drop: "foo"}).limit(-1);
    • 8. Query optimizer find({x: 10, y: “foo”}) scan terminate index on x index on y remember
    • 9. Geohashing (20, 10) (0001 0100, 0000 1010) 0000 0010 0110 0100 (21, 9) 0000 0010 0110 0011 Problem: bit-flips (127 vs 128)
    • 10. Replication Replica sets Master - slave master slave master master slave slave slave slave master master slave slave master
    • 11. Replication • oplog - capped collection • idempotent ($inc -> $set)
    • 12. Auto-sharding Shards mongod mongod mongod ... Config mongod mongod mongod Servers mongod mongod mongod mongos mongos ... client

    ×