[Backgroundrb-devel] 1) Error 2) sending request to a specific worker

Mickael Faivre-Macon faivrem at gmail.com
Sun Dec 16 03:12:13 EST 2007


On Dec 16, 2007 6:30 AM, hemant <gethemant at gmail.com> wrote:
> On Dec 16, 2007 4:42 AM, Mickael Faivre-Macon <faivrem at gmail.com> wrote:
> > Hi hemant,
> >
> > Thanks for your reply.
> >
> > The reason why I don't see the advantage to let the worker start wiht
> > bdrb may be related to my understanding of how it works, and
> > specifically to my question about keys and specific worker instances.
> >
> > I am using bdrb to keeps connections to a XMPP (Jabber) server, while
> > Rails renders the UI (web based chat application). So the way I see
> > it, is that there is only one :xmpp_worker class but several instances
> > of that class running, each with a specific login and connection to
> > the Jabber server.
> >
> > That's why I am launching a new :xmpp_worker (for each chat user).
> > And that's why I need to know how to send_request (or ask_work) to a
> > specific worker instance. I thought it could be done with the concept
> > of keys.
>
> yes you can use job keys for that. However I am curious about the fact
> that, if you have 100 concurrent users, you are going to have 100
> parallel workers running for each user? Is that what you want?
>

Well, isn't it the same than to have only one worker with 100 threads
? (Well at least on the end, you would have 100 threads, not 100 ruby
processes, that's right)
I don't know what's better.

> >
> > Is that the right way of doing things ?
> > How would you do it ?
>
> I am cooking a smallish worker with detailed explanation on how to
> handle multiple XMPP clients from one instance of backgroundrb.

You're spoiling the fun ;-)
But it will greatly helps me on understanding how bdrb works and how
to use it, so I will not complain :-)

I am looking forward to see your solution.

Mickael.


More information about the Backgroundrb-devel mailing list