From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-12-11T10:22:17+09:00 Subject: [ruby-talk:28161] ANNOUNCE: Distributor (a task distribution system) From the README file: "What is it?" I call it the Distributor Library Framework because there are several classes involved on both the client and server-sides. "What does it do?" It uses dRuby to distribute runnable objects to several clients. ["Hey, what are runnable objects?" Objects which respond to a 'run' message. It doesn't matter what 'run' does.] "What's it good for?" It's good for distributing tasks to several clients. For example, let's say you need to run several thousand compiler testcases overnight (8 hours). And it takes two days to run all of them on one client, one day on two clients, 1/2 day on 4 clients, etc... Distributor lets you distribute these kinds of tasks to several clients, thus reducing the time you need to get results. "How do I use it?" You have a Distributor and some number of Clients. For real uses, you'll instantiate a Distributor in your server-side program and a Client object in your client-side program. But for now, take a look at the file Client.rb paying close attention to the bottom of the file after the if __FILE__ == $0 You'll notice that if you run: 'ruby Client.rb' on one or more of your client machines that it will instantiate a Client object. You can do the same with Distributor.rb by running: ruby Distributor.rb [list of clients running Client.rb here] on your designated Distributor machine. There are runnable classes defined in Task.rb which get distributed to clients by Distributor in the test example. Task.rb is just included as an example of what you can do in your own 'runnable' classes (remember our definition of a 'runnable' object from above). To summerize: 1) Choose your client machines and run on them: ruby Client.rb 2) Choose you Distributor machine and run: ruby Distributor.rb [list of clients running Client.rb here] Looking at Distributor.rb and Task.rb will show you how to use Distributor to distribute your own custom runnable objects. If you have any questions email me at: rubyfan@programmer.net "What license is this code covered by?" Same as Ruby's. You can download it at: http://www.aracnet.com/~ptkwt/ Phil