Client side Callback in GWT?

Well, there are a couple of Options. You need to get the data from the server... So you either need to poll the server, or use server push Polling is pretty easy. Just use the Timer class to repeatedly call a service to see what value it should be displaying Server push is done using something like comet here is one implementation for gwt that looks somewhat promising.

They basic concept behind this is the browser sends a request to the server and keeps the connection open so the server is free to keep sending data back Comet is the better option if you can get it working. It will probably be simpler and scale better Good Luck!

Well, there are a couple of Options. You need to get the data from the server... So you either need to poll the server, or use server push. Polling is pretty easy.

Just use the Timer class to repeatedly call a service to see what value it should be displaying. Server push is done using something like comet. Here is one implementation for gwt that looks somewhat promising.

They basic concept behind this is the browser sends a request to the server and keeps the connection open so the server is free to keep sending data back. Comet is the better option if you can get it working. It will probably be simpler and scale better.

Good Luck!

I'm not sure a push model will ever 'scale better' than a poll model. You're tying up server resources in order to be a little lazy on the client side. On main benefit of GWT is that more work is given to the client so that the server can more easily handle large volumes of users.

I would recommend switching to a Poll vs a Push model. – Kieveli Dec 21 '10 at 13:29 It depends on your exact situation. If you are streaming a lot of data pretty frequently to a lot of clients, something like atmosphere might save you the time off constant renegotiating those connections.

– Steve g Feb 4 at 21:21.

Polling is probably the best way to do what you're looking for. The big gotcha with GWT is that everything has to be serializable. I'm not sure if anything that can push to the browser can be easily serialized.

If its for logging, the thing getting pushed from the server would be a string of sorts I guess – Chii Oct 10 '08 at 11:42.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions