* This was our experience, YMMV. I just wanted to share our story in hopes it would help others avoid some pitfalls.
I'll try to give honest responses to questions asked. I'm not trying to be unnecessarily cynical, overly negative, or anti-10gen in my slides, talk, or comments here. I'm sure many people are using MongoDB happily, and I've heard 10gen's support is outstanding.
A good part of your presentation should have been what your requirements are.
For example: MongoDB's schemaless feature has a downside that means more data as a key must be defined individually. Great if you constantly need to fix/change the schema. A structured schema solution obviously has a space saving.
Kind of a side topic, but lazy, JIT migrations work well for this. You keep a "migration chain" in your fetch layer that goes v1 -> v2, v2 -> v3, and every persisted doc is tagged with the schema version at the time of persistence.
Then, your binding code just runs it through whatever subset of the chain brings the document to v-latest. If the document is re-written, it will (naturally) be re-written in updated form, and you'll only pay the upgrade penalty once (or, not at all for cold data).
It sounds kinda creepy to old-school schema theorists, but in practice it actually works pretty well (provided you always use this library to retrieve your objects.)
Using this method, I've never done a stop-the-world schema migration on a schema-free system, and I don't think I ever would... otherwise, you're tossing out one of the major benefits of schema-free: no migrations! If you're going to be rigorous about full-collection schema consistency, you maybe should have just used a proper RDBMS to begin with...
I am trying to come up with a simple way of automatically handling data and schema migrations across a database that spans client and server treating both as masters. It just seems incredibly difficult to get right. Your idea of handling migration at read time sounds promising.
Yep--and just to reassure you, it's more than an idea on my end... I designed and maintained a critical system a few years ago on a large K/V store that used this method, and it worked without a hitch. We never even needed to think about the fact that the documents within the store were comprised of various schemas from several generation of the application (except when we wrote and tested the next incremental link the upgrade chain).
* Slides w/o notes available here: http://opensourcebridge.org/2011/wiki/Scaling_with_MongoDB
* Most slides referred to MongoDB 1.4
* This was our experience, YMMV. I just wanted to share our story in hopes it would help others avoid some pitfalls.
I'll try to give honest responses to questions asked. I'm not trying to be unnecessarily cynical, overly negative, or anti-10gen in my slides, talk, or comments here. I'm sure many people are using MongoDB happily, and I've heard 10gen's support is outstanding.