Click to See Complete Forum and Search --> : constant server connection


ttupper
12-18-2003, 12:41 PM
Hello all;

I have a page displaying status indicators for a number of systems. Statuses change often and unpredictably. I don't want to refresh the page every 5 seconds in order to catch changes in status - I would rather *tell* the page that something has changed.

I designed the page such that relevant status areas are identifiable and can be dynamically re-written. What i'm interested in is some way to maintain a constant connection with the server.

My ideal solution would be some kind of control or applet that sits on a page and acts as a listenter, waiting to recieve command strings from the server. It could be as simple as an applet or other device that recieves a string and hands it off to a javascript handler to parse. It would be highly desirable for this object to be able to trigger a javascript handler and hand off to it the string it recoeved - the script could then parse the string and decide what to do on the page.

Any help or alternative solutions would be appreciated. I would be ok hitting the server in the background and returning a change list, as well.... but this is subject to latency issues etc. and I haven't been able to get it to work properly.

Again, all help is appreciated.

AdamGundry
12-20-2003, 05:39 AM
I think your best bet would probably be with Java, if possible - you can open a socket connection to a server, which will remain open, and wait for a status update. The Java applet could then display the change itself, or I believe Java can trigger Javascript in webpages.

Adam

Vladdy
12-20-2003, 07:44 AM
XMLHTTP with some javascript should do the job, IF SERVERS ARE ON THE SAME DOMAIN

eclectic30
12-20-2003, 03:14 PM
You said "Any help or alternative solutions would be appreciated"

Well, somewhere here I have just replied to a thread about a product called AstroMark that we have used in the past for just this sort of thing.

If your status information is in a database table, and you don't want to write a lot of code to do this, AstroMark is worth checking out. A page is created that connects to a database table. The table object has properties called refreshrate which you set to any any number in millliseconds. At run time that table auto refreshes itself by visiting the server. In HTML mode, it refreshes the page in AstroPage mode the page stays put while the data changes.

If you have the time check it out www.astromark.com

ttupper
12-29-2003, 01:49 PM
Does anyone know of any java applets that are designed to do exactly this?