A framework agnostic port of the mack-distributed package.
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with markbates:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.bundle
bin
lib
spec
.gitignore
.rspec
.rvmrc
Gemfile
Gemfile.lock
LICENSE
README
README.textile
Rakefile
distribunaut.gemspec

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
    
   
  

# '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 

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

# 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">

   

Contributors

  • Mark Bates
  • Josh Schairbaum