Hacking Chess: Data Munging

This is a supplement to the Hacking Chess with the MongoDB Pipeline. This post has instructions for rolling your own data sets from chess games. Download a collection of chess games you like. I’m using 1132 wins in less than 10 moves, but any of them should work. These files are in a format calledContinue reading “Hacking Chess: Data Munging”

Hacking Chess with the MongoDB Pipeline

MongoDB’s new aggegation framework is now available in the nightly build! This post demonstrates some of its capabilities by using it to analyze chess games. Make sure you have a the “Development Release (Unstable)” nightly running before trying out the stuff in this post. The aggregation framework will be in 2.1.0, but as of thisContinue reading “Hacking Chess with the MongoDB Pipeline”

Replica Set Internals Bootcamp: Part I – Elections

I’ve been doing replica set “bootcamps” for new hires. It’s mainly focused on applying this to debug replica set issues and being able to talk fluently about what’s happening, but it occurred to me that you (blog readers) might be interested in it, too. There are 8 subjects I cover in my bootcamp: Elections CreatingContinue reading “Replica Set Internals Bootcamp: Part I – Elections”

Popping Timestamps into ObjectIds

ObjectIds contain a timestamp, which tells you when the document was created. Because the _id field is always indexed, that means you have a “free” index on your “created at” time (unless you have persnickety requirements for creation times, like resolutions of less than a second, synchronization across app servers, etc.). Actually using this indexContinue reading “Popping Timestamps into ObjectIds”

SQL to MongoDB: An Updated Mapping

The aggregation pipeline code has finally been merged into the main development branch and is scheduled for release in 2.2. It lets you combine simple operations (like finding the max or min, projecting out fields, taking counts or averages) into a pipeline of operations, making a lot of things that were only possible by usingContinue reading “SQL to MongoDB: An Updated Mapping”

Getting Started with MMS

Edit: since this was written, Sam has written some excellent documentation on using MMS. I recommend reading through it as you explore MMS. Telling someone “You should set up monitoring” is kind of like telling someone “You should exercise 20 minutes three times a week.” Yes, you know you should, but your chair is soContinue reading “Getting Started with MMS”