Mongoid vs MongoMapper

  • Mongoid is completely Rails 3 compatible, and uses ActiveModel all
    over the place (validations, serialization, etc), where MongoMapper is still focused on Rails 2 and uses the validatable gem for its validations.
  • Mongoid officially supports and works on Ruby 1.8.7, 1.9.1, and 1.9.2 head.
  • Mongoid supports embedded documents more robustly, performing the MongoDB atomic operations on any area of the hierarchy internally. ($set, $push, $pull, etc). With MM you need to explicitly tell it to do these operations.
  • MongoMapper has better relational association support and works like this as default.
  • MongoMapper is more extensible, with a plugin architecture that makes it pretty easy for people to extend it with their own libraries. Mongoid does not have this.
  • MM supports identity maps, Mongoid does not.
  • MM has a larger community, and probably more 3rd party library support. I went crazy on documentation and rdoc.
  • Mongoid supports Master/Slave replication clusters. (Writes to master, round robin reads to slaves) MM does not.
  • Mongoid has an extremely rich ARel style criteria API, MM use AR2 style finders.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s