[racket] Remote execution in Racket

From: YC (yinso.chen at gmail.com)
Date: Fri Aug 20 14:04:57 EDT 2010

On Fri, Aug 20, 2010 at 1:52 AM, Frederick Ross <madhadron at gmail.com> wrote:

> Unfortunately, I can't figure out how to dump images from Racket.  Is
> it possible?  Or am I having brain creep from Common Lisp?  Or if
> anyone can think of a cleaner way to do this, I would really love to
> hear it.

It seems like all you need is a batch architecture in racket, is that
correct?  I am assuming the following:

   1. your macro generates function calls with new arguments, instead of new
   2. your functions are queued only because you need to wait, not because
   of other constraints such as lack of memory to keep them all in memory at
   3. you are waiting for either the LSF to signal you being ready, or just
   for a particular time on the day (or particular to sequentially execute one
   by one)

So to solve the dump/load issue - you can, instead of dumping the image,
just dumb the arguments to the function call into a file. And then when you
load the file, execute the function call with the arguments from the file.

You can do the above either keeping a persistent racket image, or continue
to restart a new racket instance.

If you want to restart racket, you can even dump a shell script with the
function call with the arguments embedded, then just run the script.

If you are actually generating a new function, then it's simpler to use the
shell script approach.

You can leverage cron for a batch architecture if your jobs are executed at
particular time intervals.  If instead what you need is to execute
everything sequentially as fast as they come, you can write a main loop that
look for job files in your temp directory, and then execute them by loading
them via the above approach.  This approach works with both arguments file
and script file approach, but you might find the arguments file approach
works better in the sense that it does not have to create a sub process.

Hope this helps.  If my assumptions are incorrect - please feel free to


Taming the software dragon - http://dragonmaestro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100820/39331dd7/attachment.html>

Posted on the users mailing list.