[Backgroundrb-devel] Passing objects to drb, does it keep the existing db connection?

Ezra Zygmuntowicz ezmobius at gmail.com
Wed Jul 19 17:41:50 EDT 2006

On Jul 19, 2006, at 2:36 PM, Ben Johnson wrote:

> I have a simple question. Let's say I do this in one of my models:
> after_save
> 	drb_conn.some_method(self)
> end
> When that object gets over to the background process is it the  
> exact same as?....
> Model.find some_id #in the background process
> As far as my background process is concerned passing the object is  
> not any different than passing the id and using the find method?  
> Because when I try to inspect the object that has been passed over  
> I don't get the typical .inspect output that you get from object of  
> models.
> Thanks for your help.
> Thank You,
> Ben Johnson
> E: bjohnson at contuitive.com


	The inspect output will be different because the object is now  
DRbUndumped. THis means that the object actually stays on the rails  
side of things and the drb server just sends method calls to it. You  
should read up a bit on drb and DRbUndumped so you can understand how  
these things work.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060719/8c7f6142/attachment.html 

More information about the Backgroundrb-devel mailing list