This is Archipelago, a distributed computing toolkit for ruby.

It consists of several different parts, that can be used standalone or in conjunction.

Dependencies:

Archipelago::Hashish::BerkeleyHashishProvider

ruby bdb: moulon.inra.fr/ruby/bdb.html

String

ruby inline: www.zenspider.com/ZSS/Products/RubyInline/

Sub packages:

Archipelago::Disco

A UDP multicast discovery service useful to find services in your network with a minimum of configuration.

Archipelago::Tranny

A distributed transaction manager inspired by the jini service mahalo.

Archipelago::Current

A tiny concurrency toolkit used in various parts of Archipelago

Archipelago::Hashish

A hash-like tool that provides transparent persistence.

Archipelago::Treasure

A distributed object database where the objects never leave the database, instead you do your operations upon references to the objects. It has support for serializably isolated transactions with optimistic concurrency control using Archipelago::Tranny or any transaction manager with similar semantics.

Archipelago::Pirate

A client tool to allocate Archipelago::Treasure::Chests for different keys and act like an almost normal local Hash for providing distributed and scaleable object database facilities to any ruby application.

Usage:

To use archipelago in the simplest and most obvious way, just run the script/services.rb script.

You can run this on any number of machines in your local network, and they will all communicate through their own discovery services.

Then you instantiate an Archipelago::Pirate::Captain anywhere in the network. This instance can be used basically as a normal Hash - most everything will be transparently hidden from you.

Everything you put in this instance will be persistently stored in the network.

Examples:

To run a transaction manager and a database server, just do the following (from script/services.rb):

:include:script/services.rb

To set up an Archipelago::Pirate::Captain and load some debugging overloads do the following (from script/pirate.rb):

:include:script/pirate.rb

Or you can run script/console, which starts an irb and loads script/pirate.rb.

So, to set up a test environment to play around with in a few simple steps, run the following commands in a few terminals:

script/services.rb /tmp/services1
script/services.rb /tmp/services2
script/console