Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Server Push

Reply
Thread Tools

Server Push

 
 
John Bradbury
Guest
Posts: n/a
 
      07-03-2003
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


 
Reply With Quote
 
 
 
 
Dale Strickland-Clak
Guest
Posts: n/a
 
      07-04-2003
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.


--
Dale Strickland-Clark
Riverhall Systems Ltd, www.riverhall.co.uk
 
Reply With Quote
 
 
 
 
Van Gale
Guest
Posts: n/a
 
      07-05-2003
Irmen de Jong wrote:
> John Bradbury wrote:
>
>> 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?

>
> 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

 
Reply With Quote
 
John Taylor
Guest
Posts: n/a
 
      07-07-2003
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


"John Bradbury" <john_bradbury@___cableinet.co.uk> wrote in message news:<bea2qv$jiv$(E-Mail Removed)>...
> I have used the Netscape examples and can not get them work. I am using
> Windows and have tried Omnicron and XITAMI servers. What is frustraing me
> is that I can achieve the desired result in Delphi by simply using :
> response.sendresponse;
> request.writestring('progress line');
>
> I was hoping to find similar functionality in Python.
>
> John
>
>
> "Irmen de Jong" <(E-Mail Removed)> wrote in message
> news:3f05b7ab$0$49103$(E-Mail Removed)4all.nl...
> > John Bradbury wrote:
> > > 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?

> >
> > Check out: http://wp.netscape.com/assist/net_sites/pushpull.html
> >
> > There are basically two ways to do this. Either use the
> > above mentioned "multipart response", which only seems to work on
> > certain browsers (confirmed on netscape and mozilla, IE doesn't seem
> > to work). The other method is just flushing your output and
> > continue to write more data... but this won't allow you to
> > 'clear the page' in the client's browser (multipart repsonses will).
> >
> > --Irmen
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are "Array#push" and "pop" not "push!" and "pop!"? samppi Ruby 27 12-05-2007 07:24 AM
J2ME program for Push Email, IM, Push RSS on your mobile phone! XyZaa Java 0 07-19-2007 03:00 PM
Server Push PyroBrain ASP .Net 0 01-22-2004 03:53 PM
Server push to client Alin Capitanescu ASP .Net 1 01-05-2004 11:10 PM
how to do a server push DesignerX ASP .Net 3 08-12-2003 07:28 PM



Advertisments