Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Designing an enqueing application proxy

by jbert (Priest)
on Jan 04, 2008 at 00:35 UTC ( #660348=note: print w/replies, xml ) Need Help??

in reply to Designing an enqueing application proxy

I'd say you're not far off. The biggest issue is the idea of the 'timed subroutine' to dispatch requests to the worker threads.

More easily, the worker threads can just grab another request when they have finished what they are doing (the job queue will need a mutex to avoid multiple threads messing with it at the same time).

You also only need one listener. The job of that thread is to accept evey incoming connection and put the request in the 'to be processed' queue, which the worker threads are consuming as described above.

Of course, some people prefer processes to threads, etc. And your problem is probably best solved by changes to the applications at either end. Still, I hope the above is useful.

  • Comment on Re: Designing an enqueing application proxy

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://660348]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2021-04-15 01:32 GMT
Find Nodes?
    Voting Booth?

    No recent polls found