开发者

Cassandra, mongodb or couchdb for Ruby on Rails [closed]

开发者 https://www.devze.com 2023-01-12 14:10 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 9 years ago.

Improve this question 开发者_开发知识库

I think these three are the most popular non-relational db:s out there at this moment.

I want to give them a try, but I wonder which one of these are most suitable for Rails when it comes to Gem, documentation and tutorial support.

Eg. if I install a very good gem that is for Rails but this just use AR and mongodb, then it would be a pity I didn't use mongodb.

  • How many gems are supporting each one of these databases?

  • Which one is the most popular and main-stream in ruby/rails community, thus has more online documentations/tutorials?

  • Which one offers tight integration of Rails?


To make an informed selection, you'll really need to know your data model. MongoDB and CouchDB are document-oriented data stores. Cassandra is quite different, it is a bit more special-purpose and its distributed design is its strength. It's more of a distributed key/value store but with slicing, timestamp sorting, range queries, with limited data types. If you had a huge amount of data and knew exactly how it needed to be indexed for retrieval, Cassandra might work. Mongo and Couch are better for ad-hoc queries, and for example an AR replacement for a Rails app.

As far as popularity, I'd say MongoDB is currently more popular with Rubyists, but in general CouchDB seems to have more mindshare and a lot of momentum.

See also http://nosql-database.org/ for more information on the differences.


I personally used "mongoid" recently and it was working really good. One thing to keep in mind is that they are more active in Rails 3.0 branch so not all features listed on their website work in Rails 2.x (for example references). I also tried to use "Devise/Warden" for authentication and it worked seamlessly in Rails 3.0 but did not have support for Rails 2.x + mongoid (although mongomapper was supported)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号