| Anton van Straaten 2006-07-30, 7:02 pm |
| Eric Hanchrow wrote:
>
>
> gavino> How does one do this with plt scheme? I saw rubyq and was
> gavino> like wow http://raa.ruby-lang.org/project/rq/
>
> My hunch is: not easily.
A fair amount of work is always involved in developing a general-purpose
package like Rubyq, but there's nothing particularly difficult about it.
Rubyq implements a straightforward job queue: nodes check a queue for
jobs, grab the next available job, and execute it. Other than the job
queue itself, Rubyq provides no support for communication between nodes.
To implement such a queue for a particular project is easy enough in any
Scheme with decent communication support (i.e. most full
implementations). Of course, it would take more work to package such
functionality as a general-purpose package, as has been done in the case
of Rubyq.
> However, take a look at http://www.toute.ca/ -- that's the home of a
> package [Termite] that works with Gambit scheme, which gives you basic
> concurrent programming. It should be relatively easy to build a
> cluster from that (although to be honest I've never gotten around to
> doing so).
Termite is built around a much more sophisticated concept than Rubyq.
Termite supports arbitrary communication between nodes, by allowing
first-class Scheme values, including closures and continuations, to be
transmitted between processes and across nodes. This is very powerful,
supporting true distributed/concurrent processing, in which processes
can easily collaborate with each other at a high level during processing.
Termite could certainly be used as a communication and process-spawning
mechanism to implement a Rubyq-like job queue, but it'd probably be
overkill, unless you also plan to have your jobs communicating with each
other in ways that Rubyq doesn't provide support for.
Anton
|