Re[2]: Simulation of modem connections [& ping reply]

Christopher Taranto (christopher@tokpela.com)
Tue, 02 Mar 1999 12:49:57 -0800


>So I think I need a way to simulate slow modems. I am currently

>Does anyone else have any other suggestions ? Has this been done before ? Am
>I barking up the wrong tree ?!

While not directly related to LWP, I believe there is mod_perl module
called Throttle that I ran across that deals with content negotiation based
on modem speed.

Apache::Throttle is responsible for negotiating the content of certain
requests based on the speed of the connection. It does this by checking
each request to see if it passes the following criteria: 

http://cpan.perl.com/docdir/Apache-Throttle-0.03/Throttle.pm.html

This might give you a few ideas.

HTH,

Christopher Taranto

At 12:36 PM 3/2/99 -0000, you wrote:
>I am looking at ways of testing a simple Web application to see how the
>server performs using Webchatpp and thus LWP.
>
>The testing will be done using a local high-speed network. I can insert
>suitable delays into a Webchatpp script to ensure that the pauses between
>GETs and PUTs etc correspond with expected usage, which is likely to be
>remote access via modems and extermal ISPs.
>
>Since the connections are generally only established for the duration of the
>PUT or GET etc and then closed, this means that the duration of these
>connections will be much shorter than those established by browsers which
>connect via modems. Thus the connection load on the server will be
>substantially different.
>
>So I think I need a way to simulate slow modems. I am currently
>experimenting with a local copy of IO::Handle, intending to modify
>sysread/syswrite to add suitable delays, based on the packet size. [Or I
>guess I could amend LWP::Protocol::HTTP etc and add the delays there.]
>
>Does anyone else have any other suggestions ? Has this been done before ? Am
>I barking up the wrong tree ?!
>
>Thanks in advance for any feedback,
>Sebastian Bazley
>P.S. Ping response: yes, Ed, I did get your posting (LWP::Simple::post, also
>ping request)
>
>P.P.S. I am not very experienced in writing Perl modules, so there may be a
>better way of adding hooks or replacing code in a module other than just
>modifying a clone of it ...
> 
>
>Attachment Converted: "C:\EUDORA\attach\Simulation of modem connections"
>