This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have simulated push behavior using AJAX calls from IE. Parts of web page get updated every second getting fresh content from the server using the request object displayed below. However, after a while (some time 5 minutes, sometimes 15 minutes or so later) the update stops happening. The IE icon spins relentlessly, but no content update.
One observation made is that with "netstat -an" on the client system, we can see may be hundred or more connections to server with TCP state "CLOSE_WAIT"
Any suggestions how to get the screen updated without interruption?
To the user it's not excessive. They want to see near real time (minimum of 1 second) update of data on their browser. That's roughly 30KB data that need to be generated and shipped to the browser every second.
However, it's only one page whose final size is less than 32KB when shipped to the browser. Currently this 32Kb HTML replaces an innerHTML on a template html with logos etc already loaded. Users limited to a maximum of 5.
So much for AJAX's simulated push hype?!
With COMET's approach, seems that we will have to redo much of the way things are already done.
Originally posted by Bear Bibeault: Do you not think that banging on the server every second is a bit excessive? How many pages are doing this sumultaneously?
Joined: Nov 08, 2001
Your server is going to come to a crashing halt when it has multiple users. You probably should look at FLEX which is better for real time data.
Joined: Dec 09, 2004
Server is handling fine. In less than 200ms its generating the content and sending out (per avg response time measurement of related servlet/jsp WAS). Browser (IE 6) seems to get confused with multiple AJAX calls made to the server.
The same code works fine on Firefox to update the content within the second without interruption; except there's a noticeable flicker on Firefox when the html rendered with the update.
Originally posted by Eric Pascarello: Your server is going to come to a crashing halt when it has multiple users. You probably should look at FLEX which is better for real time data.