Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Intelligent client browser!!!

 
Ashutosh Uprety
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can generally write web pages which automatically refresh after some predefined time to show changes in data.
How about this scenario ??
If I want to refresh the client page only and only when there is a change of data (and not after every 60 seconds), how to go about it??
Mind you, if the data is not changed at the server, then the client should not refresh itself.
If not in JSP, then is there any other way of achieving this "intelligent refreshing capability" on the client browser ???
 
sebastien GUERLET
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there is no way to do a such thing (called "push" I think) until you write your own client... which it seams to not be the case here. In fact, your server has to send a request to the web client but none of the market client (ie, ns,...) can hold this request as you want.
 
Steve Chernyak
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had this issue come up before.
We ended up just refreshing even if there was no chage, but these are the ideas we had:
1. use an applet (needs a plugin)
2. inside the jsp display general content, that will not change, call flush, and then call a blocking method that does not return until there is a change.
We always expect there to be a change on the server. That is even if the data did not change we would time out after a certain period, and display the rest of the page.
I am interested in hearing opinions about this apporach
Thanks, Steve
 
Maky Chopra
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm no good at applets but cant you have an applet refresh the entire html page ? If so.. have a 1 px * 1 px applet that acts as your client that quesries the server and once it detects the change, have it reload the page.
 
Glen Tanner
Ranch Hand
Posts: 147
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a way....Pushlets
[This message has been edited by Glen Tanner (edited June 28, 2001).]
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Glen Tanner:
There is a way....Pushlets
[This message has been edited by Glen Tanner (edited June 28, 2001).]

Great article. Thanks.
Jason
 
Glen Tanner
Ranch Hand
Posts: 147
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You know, I think I spoke too soon. I played around with the Pushlet stuff for awhile, and it just doesn't seem like a very elegant solution to me. Besides, the code hasn't been updated for quite sometime. This could actually turn into a maintainance nightmare.
The best solution I can come up with is still client side polling. I agree that is at least an interesting article though.
 
Ashutosh Uprety
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even I went through the article. Yes it is impressive, but it just means too much load on the server, which is not a very good sign. Also SUN does not seem to ok this technique. There is something called "aglets" developed by IBM, which may form good reading.
Anyway, if anyone gets anything on my original question, then pls do write.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic