D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] Staged / incomplete output from Perl over TCP/IP / HTML



I've got a long perl script that queries lots of various servers - it can take 
5-15 minutes to complete.

Using it in console mode, I can print output at every stage and the terminal 
remains available. This allows me to output:
Trying server 1 : not found 
Trying server 2 : not found
in real time.

Now if I try this using HTML/Apache, the browser will wait until the 53rd 
server before receiving/outputting the page. In this time 99% of all servers 
will timeout.

Is there a way of outputting progress indicators in real time over a normal 
CGI/HTMl/Perl/Apache config?

I've thought of using meta http-equiv=refresh but that just seems messy.

Do I have to write a Java applet to do it? The Java applet cannot do the 
queries itself, so how could that output the data in real time? It would 
presumably have to check in with the server, much like the refresh tag, by 
taking a guess about how long each server might take. Sometimes the user 
would see 1 server result, other times maybe 3 or 4.

Is there another way?

-- 

Neil Williams
=============
http://www.codehelp.co.uk
http://www.dclug.org.uk

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

Attachment: pgp00070.pgp
Description: signature


Lynx friendly