2009/11/26 Master Marv <marvin.mun / gmx.de>:
>> include DRbUndumped
> this seems to let the class reside wherever it has been generated.
> is it possible to generate a class on a drb client, copy it to the
> server and then let it stay there (ie. further interaction with the
> class should be made with the the class on the server and not with local
> copies).
>
> what i want to do is the following:
> i have a class that has a run and a status function. when the run
> function is invoked the class computes something for ~5minutes.
> the calculation should happen on the drb server.
> multiple drb clients should generate classes on the server(or locally
> and copy them to the server), so that the server does the computation.
> after the jobs have been started (remote_job_array[x].start) the clients
> terminate. other clients that should check the status of the computation
> via a status function (remote_job_array[x].status) of the class on the
> server.

DRb does not implement the concept of moving *code* around.  You
either have to do it manually (there are several ways to do that) or
you have to require the class needed for the operation to be present
on the server already.

Ways how you can send over code:

- as a string of valid Ruby code (very insecure)
- as the name of a file to load on the server (a bit more secure)
- as a string of a particular DSL you invent for the task
- in your case you might be able to parametrize class generation and
do it completely on the server

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/