russ / distributed

Distributed Rails Objects

This URL has Read+Write access

distributed / README.rdoc
100644 29 lines (17 sloc) 0.568 kb

Usage

Start the ring server daemon

        ./script/ring_server

Create a ActiveRecord model that knows how to be distributed

        class User < ActiveRecord::Base
                include Distributed::Distributable
        end

Use this object across the network

        user = Distributed::User.find_by_name('Shake')
        user.save!

Configuration

        Distributed::Config.development # Fakes interaction if true
        Distributed::Config.app_name # Applciation Namespace
        Distributed::Config.timeout

Tips

To increase the speed of the object loading require the model in an initailizer

        require 'user'