2

I need a solution for a specific feature of my application ,feature is same as recent achievements category of stack overflow.When a specific event happen in server (may be some level achievement or some kind of condition satisfy)then i want to notify to user through the GUI of my application ,What is the best approach to do this specif use case .thanks in adnvance

Jamsheer
  • 3,673
  • 3
  • 29
  • 57
  • 1
    Have a look at http://www.html5rocks.com/en/tutorials/eventsource/basics/ and http://www.html5rocks.com/en/tutorials/websockets/basics/ – Ravindra babu Oct 13 '15 at 14:25

1 Answers1

4

You'll either want to use WebSockets or clientside polling.

There's a few java libraries out there to help abstract you from the underlying mechanics which can fallback to polling if websockets are not supported by the browser:

  1. cometd
  2. atmosphere
  3. DWR's reverse-ajax
  4. spring mvc

Im sure there's more but that'll get you started :)

lance-java
  • 25,497
  • 4
  • 59
  • 101