...

View Full Version : Live Data: Server to Client with No Refresh



RickAce
08-24-2004, 12:29 AM
Hello,

I am new to web design and I am trying to find a way that allows "real time" virtually instant page updating.

The reason for this real time page updating is to show buy and sell points for my customers intraday futures trading (I would enter data on my side (server) and it would show up on my customers (client) web browser without them have to hit refresh).

I do not know if I would have to create a server/client JAVA web application or if PHP, Coldfusion, or other would be simpler to create from.

Any help would be greatly appreciated.

Thank you in advance.

RickAce

A1ien51
08-24-2004, 02:58 AM
Only thing you can do is set up the page to auto refresh after a set peroid of time. You can do it with meta tags or using setTimeout() with JavaScript.

Without refreshing there is no way to get the new data....

Eric

glenngv
08-24-2004, 06:44 AM
You need to poll the server for every desired interval (maybe every 2 mins or so) and implement a remote call to the server through a hidden iframe technique. See this (http://www.dynarch.com/mishoo/rpc.epl) for more details of the technique.

jamescover
08-24-2004, 06:53 AM
Maybe, try the PERL/CGI forum, and ask about server push, like that used in realtime chat clients. That will probably suit your needs.


-james

sad69
08-24-2004, 08:02 AM
Java Applet can do it.. just look at everything at http://games.yahoo.com, I think it uses the MVC pattern..

Flash might be able to do something similar, but I'm not sure (don't know much about Flash..)

Sadiq.

Garadon
08-24-2004, 09:40 AM
just an addition to what glenngv then it can also be accomplished by script tags.

jbot
08-24-2004, 02:11 PM
I think it uses the MVC pattern..

how do you know? do you know wot MVC is (apart from quickly referring to Google)?

Vladdy
08-24-2004, 06:32 PM
You need to poll the server for every desired interval (maybe every 2 mins or so) and implement a remote call to the server through a hidden iframe technique. See this (http://www.dynarch.com/mishoo/rpc.epl) for more details of the technique.
Here is a way without the need for IFRAME:
http://www.codingforums.com/showthread.php?t=16205
and a followup: http://www.codingforums.com/showthread.php?t=17308

requestcode
08-24-2004, 06:40 PM
Here are some more resources, although Vladdys looks pretty good.
http://www.oreillynet.com/pub/a/javascript/2002/02/08/iframe.html

http://www.ashleyit.com/rs/main.htm

sad69
08-24-2004, 07:02 PM
how do you know? do you know wot MVC is (apart from quickly referring to Google)?

Well I'm pretty sure, I've made a Blackjack game in Java before with 2-4 players, and that's how I did it. It's the easiest way to update multiple clients by adding them as observers, and notifying them all that the model has changed.

Regardless, Vladdy's method looks very cool! It sounds more like what you need, however, a setTimeout() "loop" will be needed in addition as RickAce explicitly said that clicking a button is not good enough.

Good luck,
Sadiq.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum