Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Designing an enqueing application proxy

by emazep (Priest)
on Jan 04, 2008 at 01:27 UTC ( #660357=note: print w/ replies, xml ) Need Help??

in reply to Designing an enqueing application proxy

Ave bronto!

It seems that you are looking for some sort of job queue manager, an application pattern for which we fortunately have several implementations in Perl, some of which are widely used and considered very reliable: please have a look at TheSchwartz or POE::Component::JobQueue (there are also several others).

If not solve your problem out-of-the-box, they should at least facilitate it.

In (the likely) case I've completely missed your point, I'll accept your e me lo dovevi di' tu! ;-)

Ciao, Emanuele.

Comment on Re: Designing an enqueing application proxy
Replies are listed 'Best First'.
Re^2: Designing an enqueing application proxy
by kirillm (Friar) on Jan 04, 2008 at 10:03 UTC


    Yeah, POE::Component::JobQueue seems to fit well in this picture. First POE::Wheel::SocketFactory would accept client connection and post requests to the job queue. Then one of the 10 job queue workes would pick up the request and create a new connection to the final destination and send the data from the original source to the final destination.

    This will ensure that at any given time at most 10 connections are active. If the issue is that no more than 10 new connections should be created per second, then adding a delay of 0.1 second will be enough and one could bypass the mentioned job queue. The socket factory would get the request and fire off a proxy session with a 0.1 second delay.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2015-11-29 00:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls