[Backgroundrb-devel] Exception when doing DRb remote calls from a BackgrounDRb worker

Jason Sydes jason at heydsg.com
Wed Apr 4 15:01:27 EDT 2007

On 4/4/07, Sergio Espeja <sergio.espeja at gmail.com> wrote:

> I've marked what I think are the important lines. The orange one is
> executed in the external server and is:
>   DRb.start_service executer_service_url, drb_me
> And the yellow one executes a remote object call:
> @drb_querier.execute(chromosome, :fitness)
> where @drb_querier.execute makes a call to a DRbObject
> I hope I clarify more the question ;) I think that the problem is that
> isn't still posible to execute methods on remote objects using DRb with
> backgrounDRb. Do you agree? Do you have any idea to solve this?

My experience has been that the syntax is finicky.  (... a bdrb worker is
just a Slave object, which is a drbunix DRb_server, but you're trying to
establish contact w/ a druby DRb_server...).  I've seen the same kind of
errors in the past when I was trying to do similar things.

But we've lately been using
BackgrounDRb:: MiddleManDRbObject.init(:uri => some_uri)
inside of a worker to reliably establish contact w/ a second middleman.
(And a second middleman is just a druby DRb_server, which is what you're
trying to do.)  You might want to take a look at the exact syntax of that
init method.

(That approach won't work with the 'parent' middleman of the worker; you'll
get recycled object errors, as previously discussed on this list.)

Hope that helps,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070404/a00bc67d/attachment.html 

More information about the Backgroundrb-devel mailing list