• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Getting informations using Ajax only when they are available

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
Assume that I want to employ Ajax in my auction web application.
As you might have guessed, Ajax is used here to get the highest bid <b>when it is available</b>.
Using a timer in the client is not solution, I think.
Maybe no new bid is available, running the Ajax code in this case at fixed intervals is useless and resource hungry.
How to send notifications to the client when a new bid is available ?
(Well, forget about sending notifications , how to implement this functionality ?)
 
author & internet detective
Posts: 41405
854
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
John,
HTTP is a request-response protocol. Since AJAX is implemented on top of HTTP, it has the same limitation. This means that the server can't inform the client that something has changed.

AJAX is better than doing full page loads on each refresh though. The page can be smart enough not to repaint anything. And the server can cache the result to minimize the resource usage.
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a new library called Reversed Ajax (the server is supposed to send asynchronous messages to the client).
So, any tips how to implement my requirements ?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are going to overload your server with push technology using Ajax. You basically make a request and keep it open until the server detects something different. Called COMET.

If you want to have a socket connection, you need to use FLEX 2.0 or Applets.

Eric
 
Hey cool! They got a blimp! But I have a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic