Skip to content
chikamichi edited this page Oct 14, 2011 · 4 revisions

MongoDB bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide rich queries and deep functionality). Whether you're using the legacy mongo-rb driver or an ODM such as Mongoid, you may store roles in a dedicated Mongo collection rather than using Redis.

Don't have MongoDB yet?

All information about MongoDB installation and setup you'll find in its documentation. All available packages can be found here.

After MongoDB installation you have to install also the mongo client for ruby. You can do it easily, eg. with rubygems:

sudo gem install bson # or bson_ext for better performance
sudo gem install mongo

Configuration

Once you have installed and configured your MongoDB database, then you can start playing with ACLatraz. Configuration is little bit more complicated, because ACLatraz need here already configured mongo connection. Take a look at example:

Aclatraz.init :mongo, "roles", Mongo::Connection.new("user", "pass").db("aclatraz_test")

The "roles" option is the name of collection which should contain all defined roles.

Clone this wiki locally