开发者

How to start developing rails/django application using NoSql Database like cassandra?

开发者 https://www.devze.com 2023-01-08 09:37 出处:网络
Hello i want to use NoSql database in my rails/django application for learning point of view. What the various things i should kept in mind.

Hello i want to use NoSql database in my rails/django application for learning point of view. What the various things i should kept in mind.

Any tutorials?

things开发者_如何学编程 to be kept in mind?

Any Tips like do and don't?

EDIT I am fully flexible. I want to learn. I know php,rails,django.I want to create some application using Nosql database as learning point of view. cassandra is just an example.Any other Nosql will also work.


The django-nonrel scene is a good place to start reading up


Daniel Kehoe has a nice tutorial on using Rails 3, Devise and MongoDB.

http://github.com/fortuity/rails3-mongoid-devise


Addressing the Rails part of your question.

I would say that it is definitely viable use Ruby on Rails with Cassandra so long as you are comfortable with giving up some of the ActiveRecord idioms you may have become accustomed to. But that is probably true to a great or lesser extent with any marriage of Rails and a NoSQL datastore. The closest thing to ActiveRecord that is emerging is the Cassandra Object gem but this is still a work in progress by the author's admission. The most stable interface seems to be the Cassandra gem but this is a relatively low level API.

If you are interested in Cassandra from a learning perspective or you have identified it as the best option for an application you are building then well and good. Assuming you select Rails and Cassandra you can rest assured that the support for these will only improve and probably quite quickly given the growing interest in NoSQL and in Cassandra in particular.

However if you have other options which would work and Cassandra is only one of them then I would enter some caveats. Firstly, Rails on Cassandra is an evolving entity so you may encounter instability or things you expect to work don't work at all or completely differently that you expect. Secondly, and related to this, is that there are very few Rails on Cassandra deployments out in the wild right now so getting support from forums this will be all the more difficult. You may end up on your own with something when you can't afford to be. You may end up having to roll up your sleeves and pitch in to help with supporting the code yourself, which may be no bad thing.

Personally, I would wait to see how this picture pans out before I'd go with Cassandra unless I felt that nothing else could do the job as well. If it's for learning then I'd say go ahead. Can be a lot of fun being at the bleeding edge of things like this.

References:

  • Real world Ruby and Cassandra
  • Up and running with Cassandra


This is a example app for django with cassandra and there is an interesting post about django-nonrel and finally a feed about cassandra

You must keep in your mind: The ORM of django doesn't work completely because the difference between SQL backend and no-SQL backend, some thinks like joins, complex filters and things like that. You must change your mentality about of database.

in Django the dev team are working for official no-SQL support

0

精彩评论

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