The document discusses MongoDB, an open-source document database. It provides an introduction to MongoDB, describing how it is implemented in C++ for performance and supports many platforms and languages. It also discusses how MongoDB is adopted by over 90,000 users per month with over 1,000 production deployments, and how it provides a non-relational data model with horizontal scalability and no complex transactions.
6. Platform and Language support
MongoDB is Implemented in C++ for best performance
Platforms 32/64 bit
• Windows
• Linux, Mac OS-X, FreeBSD, Solaris
7. Platform and Language support
MongoDB is Implemented in C++ for best performance
Platforms 32/64 bit
• Windows
• Linux, Mac OS-X, FreeBSD, Solaris
Language drivers for
• Ruby / Ruby-on-Rails
• Java / C# / JavaScript
• C / C++
• Erlang
• Python, Perl
• others...
.. and much more ! ..
12. Philosophy:
maximize
features
-‐
up
to
the
“knee”
in
the
curve,
then
stop
depth
of
functionality
scalability
&
performance
• memcached
• key/value
• RDBMS
18. MongoDB Design Session
Blog Post Document
p
=
{author:
“roger”,
date:
new
Date(),
text:
“Spirited
Away”,
tags:
[“Tezuka”,
“Manga”]}
>db.posts.save(p)
19. Query Posts Collection
>db.posts.find()
{ _id : ObjectId("4c4ba5c0672c685e5e8aabf3"),
author : "roger",
date : "Sat Jul 24 2010 19:47:11 GMT-0700 (PDT)",
text : "Spirited Away",
tags : [ "Tezuka", "Manga" ] }
Notes:
- _id is unique, but can be anything you’d like
20. Create index on any Field in Document
// 1 means ascending, -1 means descending
>db.posts.ensureIndex({author: 1})
>db.posts.find({author: 'roger'})
{ _id : ObjectId("4c4ba5c0672c685e5e8aabf3"),
author : "roger",
... }
Secondary Index
35. Monitoring
• We like Munin ..
• ... but other frameworks
work as well
• Primary function:
• Measure stats over time
• Tells you what is going on with
your system