wood burning stoves 2.0*
The moose likes JSP and the fly likes How to implement simple client server push web application with JEE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to implement simple client server push web application with JEE" Watch "How to implement simple client server push web application with JEE" New topic
Author

How to implement simple client server push web application with JEE

J Nix
Greenhorn

Joined: Oct 10, 2011
Posts: 9
Hello,

I'm new to JEE and Java for web deelopment. I've been researching different ways to implement simple web services with JEE and java. One capability I haven't been able to find is creating a client server design that pushes information to the client. So no polling. The events on the server could be ever 5 minutes or every hour so I don't want to waste polling cycles with needless requests. I'd rather push the event information to the client as soon as it happens. I've looked at JMS but it seems like it isn't really designed for something as simple as this. Although the publisher/subscriber model does sound similar to what I'm trying to do in that I want the client to subscibe to events on the server.

If you could give me any information on where to look for information or keywords I could search for that would great.

Thank you,
J Nix
Greenhorn

Joined: Oct 10, 2011
Posts: 9
Could this be done with a callback or timer service?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12789
    
    5
It is possible that the COMET approach could be what you are looking for.


Polling solutions really take very little time - you can use a HEAD request to see if the server has new data. Trying to avoid polling based on your "new to web development" impression counts as premature optimization.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to implement simple client server push web application with JEE