[Backgroundrb-devel] Need help with singleton worker
isak.hansen at gmail.com
Wed May 16 05:17:37 EDT 2007
On 5/16/07, Michael Siebert <siebertm85 at googlemail.com> wrote:
> 2007/5/16, Isak Hansen <isak.hansen at gmail.com>:
> > Hmm.. I'm thinking some kind of synchronization may be neccessary on
> > the worker's job queue.
> help me understand what you mean... :) there is only one instance of the
> worker so i dont see any place that should need synchronization.
There's the thread running do_work, and I'd think there are additional
thread(s) adding jobs to the worker?
> > Btw.. How does this stuff really work? The worker instance lives in
> > the bdrb process, while middleman creates a remote-call-somehow-proxy
> > to that instance for your rails app to use?
> I use this thing in productio and it just works. there is no other magic
> behind that (besides what i have shown you
Sorry, I meant bdrb in general.
Your example was great, and easy to follow. :)
> > Any limitation on argument type(s) for public methods in my worker?
> > Being serializable is probably a must?
> they must be serializable since they are sent via drb. its the same like
> when passing arguments to do_work.
That's one piece of the puzzle down, thanks.
> kind regards,
> Siebert Webdesign
> Michael Siebert
More information about the Backgroundrb-devel