Distributed Ruby

Distributed RubyLanguage module, written completely in Ruby. By MasatoshiSeki?.

DRb is included with Ruby 1.8. See also: http://raa.ruby-lang.org/list.rhtml?name=druby

Any object can be published on a port on the computer, there's no need for compiling stubs etc.

Includes a TupleSpaces implementation.

It also includes a Jini-like (service autodiscovery) system named Ring (see RubyRingServer).


It is amazingly simple to use, especially when compared to JavaLanguage's RemoteMethodInvocation. Below is the complete source code for a "HelloWorld"-server:

 require 'drb'

class ExampleServer def hello "hello world" end end

DRb.start_service("druby://localhost:1234", ExampleServer.new) DRb.thread.join

Here's the client:

 require 'drb'

DRb.start_service srv = DRbObject.new(nil, "druby://localhost:1234") p srv.hello


EricHodel? probably has the best English writeup. You can read his stuff on his website: http://www.segment7.net/projects/ruby/drb/


CategoryRuby


EditText of this page (last edited June 19, 2006) or FindPage with title or text search