views:

40

answers:

1

I've had the thrill recently of developing web service applications. Most of my experience is with GWT and mainly doing most things on the client side then doing an async call back for any additional data needed.

However at the moment, I want a process that will be triggered on the client side, then on the server side, a loop will occur, where if a certain condition is met, it will 'push' back to the client. This will hopefully remove the processor usage on the client side and also saves bandwidth. What is this called? I understand 'polling' is where the client side continuously hits a server, however what I want is the opposite. Is this possible? Am I misunderstanding what happened when I trigger an AsyncService in GWT?

Please advise.

EDIT: Just for further clarification: Having some kind of weather data service. Where, you trigger 'go' on the client side, then on the server side, it checks to see the degrees, if it has moved since last time, it will spit back the degrees to the client, if it hasn't, it will keep looping.

+1  A: 

The term you're looking for is "long-polling" or "comet". The rocket-gwt project includes support for long-polling requests.

Jason Hall