Server Push

J

John Bradbury

I want to send updates from a long running cgi. I have tried copying perl
examples of server push and can not get them to work.
Does anyone have an idiot proof example of a working server push or sending
output in chunks in Python?
Thanks
John Bradbury
 
D

Dale Strickland-Clak

John Bradbury pushed the bounds of literature with:
I want to send updates from a long running cgi. I have tried copying
perl examples of server push and can not get them to work.
Does anyone have an idiot proof example of a working server push or
sending output in chunks in Python?
Thanks
John Bradbury

I'm not sure what you mean by 'server push' but if you want to update a
web page progressively, you have to make sure that your web server isn't
buffering. I think IIS does buffer by default.

You can then send out incremental updates to the page using print from a
CGI script. Bear in mind though that the web page must suite this type of
update. Also, some browsers might not display it correctly until they
have the </html> tag.
 
V

Van Gale

Irmen said:
to work). The other method is just flushing your output and
continue to write more data...

I don't know the details, so this is hearsay, but there's another way
apparently used by KnowNow (www.knownow.com) to implement a 2-way web
interface. Each browser page has 3 frames, one of which is hidden and
is receiving non-ending Javascript from the server (which apparently
modifies a visible frame as it comes it comes in). This lets them do
some slick things like auto-completion in web forms.

(Apologies to John for not providing any actual help with this post :/)

Van
 
J

John Taylor

John,

You could always write a Java applet. If the applet used something
like a progress bar, the server-side program could notify the applet
when to increase the progress bar percentage. Another way to do it,
would be for the applet to poll the server every few seconds by having
it make a http connection to a 'quick-running' cgi that would tell the
applet the status. Based on this result, the progress bar would (or
would not) be updated.

You may also be able to write the applet in Jython, too.

Good luck...let everyone know how you decide to implement your
solution.
John Taylor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top