public
Description: A framework agnostic port of the mack-distributed package.
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/distribunaut.git
name age message
file .gitignore Sun Apr 05 17:14:46 -0700 2009 Initial commit. [markbates]
file README.textile Tue Jun 23 20:10:28 -0700 2009 Added $SAFE check and made app_name .to_sym [markbates]
file Rakefile Fri Jun 26 18:42:27 -0700 2009 Added the ability to borrow a service. [markbates]
directory bin/ Sun Apr 05 18:33:01 -0700 2009 Removed a few more mack-isms. [markbates]
file distribunaut.gemspec Fri Jun 26 18:42:27 -0700 2009 Added the ability to borrow a service. [markbates]
directory lib/ Fri Jun 26 18:42:27 -0700 2009 Added the ability to borrow a service. [markbates]
directory spec/ Fri Jun 26 18:42:27 -0700 2009 Added the ability to borrow a service. [markbates]
README.textile

Examples

Example #1

  
    
# 'Server' application
require 'distribunaut'

configatron.distribunaut.app_name = :user_app

class User
  include Distribunaut::Distributable

  attr_accessor :username

  def self.hi
    'hello!!!'
  end

  def save
    puts "Saving: #{self.inspect}"
  end

end

DRb.thread.join
    
   
  

# Saving: #<User:0x18ef764 @username="markbates">

# 'Client' application
require 'distribunaut'

puts Distribunaut::Distributed::User.hi

User = Distribunaut::Distributed::User

puts User.hi

user = User.new

puts user.inspect

user.username = 'markbates'

puts user.inspect

user.save

# hello!!!
# hello!!!
# #<DRb::DRbObject:0x192e6a8 @ref=13073330, @uri="druby://192.168.1.2:56836">|#<User:0x18ef764>
# #<DRb::DRbObject:0x192e6a8 @ref=13073330, @uri="druby://192.168.1.2:56836">|#<User:0x18ef764 @username="markbates">