File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Whenever there is a change in the back-end i want a notification in the front-end.

 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Whenever there is a change in the back-end i want a notification in the front-end.

Instead of time polling is there any option for the above requirement
 
Laxmikant Ruikar
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might looking for such as AJAX Push http://www.icefaces.org/main/ajax-java/ajaxpush.iface
 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any option as i don't want to use AJAX.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no reason to fear polling, it can be very fast and has the great advantage of simplicity.

Use the HEAD request and have your application return the last modified date, that way you avoid changing existing GET and POST request handlers.

Bill
 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks william and Laxmikant .

william , why did you specify particularly to use Head method ?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why did you specify particularly to use Head method ?


Interesting point - I have been paying a lot of attention recently to discussions of RESTful design philosophy.

This places a lot of emphasis on using the HTTP methods strictly according to the intent of the HTTP specifiction. HEAD is intended to get "metadata" about a resource, such as the last modified time.

Since the HttpServlet base class already contains doXXX methods for all of the HTTP methods, adding a doHead method to your custom servlet is simple.

Bill
 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great point William .Thanks a lot
 
Mohamed Inayath
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:
why did you specify particularly to use Head method ?


This places a lot of emphasis on using the HTTP methods strictly according to the intent of the HTTP specifiction. HEAD is intended to get "metadata" about a resource, such as the last modified time.

Since the HttpServlet base class already contains doXXX methods for all of the HTTP methods, adding a doHead method to your custom servlet is simple.



Wrt Bill'statement pertaining to HEAD method is correct :
HEAD method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself.
This method is often used for testing hypertext links for validity, accessibility, and recent modification.

But how come it will be useful in finding/knowing that there is change in the backend.

May be I am wrong in understanding, when saying/considering backend as DATABASE resource.
Otherwise whatever William said is right and I go with that.

Please correct me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic