in reply to how to throttle/cache a simple HTTP datastream

I'd set up a POE adaptor... one side would accept stuff from the HTTP socket, and append it to the end of a buffer, while the other side would tick at regular intervals taking off data from the front and streaming it to the client.

Hmm, sounds like an interesting column idea, but I'd first need to know why, so I could motivate it (and then write it for you!).

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on Re: how to throttle/cache a simple HTTP datastream

Replies are listed 'Best First'.
Re^2: how to throttle/cache a simple HTTP datastream
by intel (Beadle) on Jul 18, 2005 at 18:01 UTC
    Thats actually what I was considering doing, based on what I understand POE is capable of, and after reading Rocco Caputo's documentation. The only problem is that I've had the fear struck into me about the complexity of using POE. But if thats really the best way to do it then I definitely would love an excuse to learn.

    The reason for this little system is to capture stock values from a constantly updating stream and send them to a java application from the http stream. There are 2 streams and I'd like to throttle them and use one for primary and the other as an active/passive failover.

    Any recommended POE howtos? I've seen a few but some are far better than others.

        Thats actually a good question. I should ask my java programmers why they even need a buffer instead of taking it directly. Thanks :)