Database Reference
In-Depth Information
The All-New Aggregation Framework
MapReduce is a very powerful tool, but it has one major drawback; it's not exactly easy to use. Many database
systems are used for reporting, and SQL databases in particular make this very easy. If you want to group results
or find the maximum and average, then it's very simple to express that idea and get the result you're looking for.
Unfortunately, it's not quite so simple to do that in MapReduce, and you effectively have to do all the wiring up
yourself. This can often mean that an otherwise simple task is unnecessary challenging.
In response to this, MongoDB Inc (previously 10gen) added the aggregation framework. It is pipeline-based,
and allows you to take individual pieces of a query and string them together in order to get the result you're looking
for. This maintains the benefits of MongoDB's document oriented design while still providing high performance.
So if you need all the power of MapReduce, you still have it at your beck and call. If you just want to do some basic
statistics and number crunching, you're going to love the new aggregation framework. You'll learn more about the
aggregation framework and its commands in Chapters 4 and 6.
Getting Help
MongoDB has a great community, and the core developers are very active and easily approachable, and they
typically go to great lengths to help other members of the community. MongoDB is easy to use and comes with great
documentation; however, it's still nice to know that you're not alone, and help is available, should you need it.
Visiting the Website
The first place to look for updated information or help is on the MongoDB website ( www://mongodb.org ) . This site
is updated regularly and contains all the latest MongoDB goodness. On this site, you can find drivers, tutorials,
examples, frequently asked questions, and much more.
Chatting with the MongoDB Developers
The MongoDB developers hang out on Internet Relay Chat (IRC) at #MongoDB on the Freenode network
( www.freenode.net ). MongoDB's developers are based in New York, but they are often found chatting in this channel
well into the night. Of course, the developers do need to sleep at some point (coffee only works for so long!); fortunately,
there are also many knowledgeable MongoDB users from around the world who are ready to help out. Many people
who visit the #MongoDB channel aren't experts; however, the general atmosphere is so friendly that they stick around
anyway. Please feel free to join #MongoDB channel and chat with people there—you may find some great hints and tips.
If you're really stuck, you'll probably be able to quickly get back on track.
Cutting and Pasting MongoDB Code
Pastie ( http://pastie.org ) is not strictly a MongoDB site; however, it is something you will come across if you float
about in #MongoDB for any length of time. The Pastie site basically lets you cut and paste (hence the name) some output
or program code, and then put it online for others to view. In IRC, pasting multiple lines of text can be messy or hard
to read. If you need to post a fair bit of text (such as three lines or more), then you should visit http://pastie.org ,
paste in your content, and then paste the link to your new page into the channel.
Finding Solutions on Google Groups
MongoDB also has a Google group called mongodb-user ( http://groups.google.com/group/mongodb-user ) .
This group is a great place to ask questions or search for answers. You can also interact with the group via e-mail.
Unlike IRC, which is very transient, the Google group is a great long-term resource. If you really want to get involved
with the MongoDB community, joining the group is a great way to start.
 
Search WWH ::




Custom Search