Purpose of this document | Other Sites about dRuby | Sites about Linda | Introduction | Rdoc docs for dRuby-2.0.4
The purpose of this page is to provide some documentation in English of the dRuby package, for myself and for others. It will be somewhat sparse to start with, and possible inaccurate in places, but it should improve with time.
The main dRuby page is in Japanese.
Chad Fowler has an Intro to dRB, which describes how to use the package.
Distributed Ruby is also documented in the chapter Reflection, ObjectSpace, and Distributed Ruby of Programming Ruby by by David Thomas and Andrew Hunt Addison-Wesley Oct 2000 ISBN: 0201710897.
Ruby Developers Guide, Michael Neumann, Robert
Feldt, Lyle Johnson
Syngress
ISBN 1928994644
has good information on DRuby,
devoting several pages with example code to it..
The Linda programming paradigm is included here because of its applicability ro Rinda, which is part of dRuby.
The York Coordination (Linda) Group have a collection of papers online.
Rob Jackson's Research page has information on Contract-Linda.
Designing and Building Parallel Programs is a good online resource with some coverage of Linda.
dRuby or dRB allows Ruby objects to be distributed across many machines over TCP/IP, i.e, over the internet or a LAN. The model utilised is that a server distributes a single "front" object, the methods of which can be used to create and access other objects.
Furthermore, clients of this server can pass local objects to the front object, and when the front object calls the methods of these objects, the code is executed on the client machine.
So how is this done? There are two answers to that. The first is that it doesn't matter, because the whole point of Object Oriented programming is encapsulation, so "one just doesn't ask that sort of thing." :-). The second answer is that the distribution is done by Marshalling the objects (converting them to some form which can be transmitted over the network), and some rather cunning interface design to make it all look easy. I have a way to go before I understand both these topics fully.
Here are the filenames with descriptions of their contents.
nil, nil
sets up a
server locally, to handle a remote
object. For example:
aserver=DRb::DRbServer.new
ro = DRb::DRbObject.new(nil, remoteURI)
If supplied with an object will set
that to the front object. The
default URI is "druby://:0" which is
the same as "druby://0.0.0.0:0", the
latter seeming to be the most cited.
However, I have had problems with
this on windows, and
"druby://localhost:0" seems to work
for me at least within one machine.
Examining the source further, it
seems that leaving the host out
altogether (druby://:0) is treated
specially, and is the default case
for when nil
is used.
==
,
hash
and
eql?
.
Access control lists. These allow blocking hosts according to IP address.
install_list(list)
which takes a list of items, 2 by 2, and
treats this as a pair of
permissions, domain, where
permissions is allow
or
deny
. It assigns the domains
to the appropriate instance variable.
@pat
which is a
variable length array holding [:all], [:ip,
ipaddress]
or
[:name,qualified_hostname]
require "drb/drb"
Mutex
-like
facilities.
A simple implementation of tuplespace for Rinda
in
and
out
methods.
the full implementation of tuplespaces for Rinda
===
that
being matched. I.e. this is
case
.
comparison. tuples within a space need
not be equally long.
It is possible to re-validate this document.
$Id: index.html,v 1.13 2012/11/19 16:36:58 hgs Exp hgs $