[Backgroundrb-devel] Could a BackgrounDrb worker do this?

Bill Walton bill.walton at charter.net
Wed Sep 13 10:38:36 EDT 2006

Hi Ezra,

Ezra Zygmuntowicz wrote:

>> Continuing our conversation from the Rails list.
> Welcome ;)


>> Does any of the way I'm thinking about this tell you I'm heading off 
>> 'into the weeds'?
> Yes you have a few incorrect notions,

I was afraid of that ;-)

> let's see if I can clear things up for you a bit.

I really appreciate it.  I should warn you though.  Sometimes even *I* am 
surprised by my density ;-)

> Your backgroundrb worker are not rails controllers at all and they do not 
> directly respond to ajax calls. In your rails app you have access to the 
> MiddleMan object that you can  use to start workers in the drb server and 
> ping them for results  later during the ajax requests.

If I can ping the worker from the controller and they can respond and my 
controller can receive and process their response, and they're sitting out 
there running and waiting to respond, I'm not getting why they couldn't 
*initiate* a 'conversation'.  Is this a 'we don't have a tool built to do 
that' situation?  Or is it 'the Rails architecture doesn't allow for that 
kind of interprocess communication' situation?


> So IU hope that explains it a bit better.

I have a much better understanding of how to use BackgrounDRb.  Thank you. 
But I'm still confused ;-(

I think, maybe, my confusion comes from associating (in my mind) 
BackgrounDRb and dRuby (drb) as discussed in "Programming Ruby".  The DRb 
class description (p.670) says "Although expressed in terms of clients and 
servers, once the initial connection is established, the protocol is 
effectively symmetrical: either side can invoke methods in objects on the 
other side."  Could you shed some light on this for me?


More information about the Backgroundrb-devel mailing list