473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Server Push

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
Jul 18 '05 #1
3 4282
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
Jul 18 '05 #2
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

Jul 18 '05 #3
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:<be**********@sparta.btinternet.com>...
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" <irmen@-NOSPAM-REMOVETHIS-xs4all.nl> wrote in message
news:3f***********************@news.xs4all.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

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Michele | last post by:
Hi all, I have developed a PHP-based website where a "planner" user can make up schedules of activities to be performed, storing them into MySQL tables. Afterwards, other "watcher" users can...
3
by: DesignerX | last post by:
At a certain page in my web app I'm entering users into a Queue for processing, how can I do a server push (like the expedia 'searching for flights' screen) that can display a progress page then...
1
by: Alin Capitanescu | last post by:
Hi all! I need some help with asp.net! Is there any way to make the client BROWSER (IE, NETSCAPE, OPERA etc) to wait for messages from a http/https host (server) in an internet environment? ...
0
by: PyroBrain | last post by:
Hello, is there an analogous technology to the Netscape Server-Push technology? i need to develop an asynchronous application but i don't have the rights to install an ActiveX or a PlugIn. ...
3
by: Ben Kim | last post by:
Hello all, We are interested in having a server push data down to the client on a periodic basis (IE data change). This data would need to be pushed into a grid control. We do not want to...
4
by: Susan Baker | last post by:
Is it possible to "push" data from a server to a client, using PHP server side scripting?. An example script will be very useful. Thanks
3
by: petermichaux | last post by:
Hi, I am trying to put together the last major pieces of my project's puzzle. This is more website/client-side architecture than JavaScript syntax but I hope this is a good place to ask. I'm a...
2
by: ashore | last post by:
Folks, lots of stuff around re "multipart/x-mixed-replace" , which isn't supported on MS browsers. But i understand that they DO support an alternative server-push approach. I've Googled...
3
by: bnashenas1984 | last post by:
Hi everyone I know this post does not belong in PHP forum but I really didn't know where to post it. I'v made a PHP shopping cart for some markets that allows the owner to log in to admin area...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.