Ajax Push

Hi

I tested it with a Runnable class that sends a notification every 10 secons, but notifications are not seen until an event is sent from the browser to the application.

Does support Vaadin Ajax Push? There is no reference to it in any place. Is it scheduled in the future?

Thanks

There’s no Ajax push for the moment but it is in the works, what I have heard of. It There is the possibility to do polling however, so you can check, say, once every second if there is some events waiting on the server side. Usually this is done by hacking the ProgressIndicator, which is the “loading” -icon in vaadin application.
Henrik
recently made his own component which is called Refresher, that is explicitly made for this purpose.

The difference is that Refresher is much cleaner and neater for this purpose, but you have to download the component, ProgressIndicator is built in into Vaadin, but is not originally meant for this purpose.

Demos and codes for the refresher can be found in
this post
.

Ajax Push (or Comet) is something that has been discussed for a long time now.

It seems to me that enterprise applications can survive quite well without it, although chat applications scream for this feature.

Most recent discussion about this was with guys from Liferay. We preliminary planned to take deeper look into this after 5.3 release of Liferay in Q1/2010 and agreed that this is something that we should venture together.

Consider this as a rumor :slight_smile: Nothing in our official roadmap yet, and technical details are still under investigation.

Maybe this gets more attection if added to
http://vaadin.uservoice.com/

It is almost impossible to incorporate such a feature without increasing the bandwidth usage. As Sami correctly pointed out, it is not a necessity to have that in Enterprise level applications. So, my suggestion is to make it configurable so that those who really want them can “switch it on” via some configuration parameter. Or, it can be a separate component (or server/client component pair) that should be instantiated by the developer in his/her program.

Yeah well, I agree that push should be something separate, like a component, that you can use. However, there is not really any overhead in using it. For example the polling method has way more. All you need for push is that you open TCP channel between the browser and the server, where nothing is sent, until the server says it has something new to show to the user. Polling, on the other hand, opens up a new session and closes it right after, once every second or so. A round trip is however quite small, so it is no real issue. Maybe a fragment of a kilobyte.

I agree that Push should be enabled on demand. ICEfaces guys use a separate push server for handling such communications and to eluthe the 2 browser connections for target.

Push technology is not usually a requirement. But in certain applications the server must notify changes to the client, not just for chats. If you want to develop a dashboard to show in “near” realtime the status of a system, network, application, etc., and you don’t want to overload the server or interfere the user input with poller initiated requests, push is a real requirement.

I agree with all of you here. What we need is a separate (but easy) solution for this.

And the good news is that all Vaadin components already “support” this feature. The event and communication model was originally designed for this kind of stuff. It is just that the communication layer is missing.

Again today we very briefly discussed about different server push solutions. At least
Dojo’s Cometd
and
Kaazing Open Gateway
were mentioned as potential solutions. Does someone have experience of these or some other similar products?

This might be a place for little prototyping to speed up the development…

I’m going to mention
Atmosphere
for the record, even though I’ve not used it.

It popped up on the radar a while ago, I was going to look into it further, but have not found the time yet :-\

Best Regards,
Marc

I could really use some kind of Ajax Push component. In my case, I am looking to develop a remote monitoring station for a distributed simulation, and bandwidth is no concern (private network). A server would stream data updates (0.1 < rate < 1 Hz). But polling requests to the server directly from a client’s widget (e.g. VRefreser class) is tedious and will just not cut it.

Added to user voice. See
http://vaadin.uservoice.com/pages/20474-general/suggestions/385149-simple-push-solution

Go vote !

Has anybody done a workaround for this lacking functionality (server push) apart from repeatedly polling, e.g. by using other frameworks such as athmosphere, … ? I’ve seen “how-tows” on the web which show that it is possible with bare bone gwt and athmospehre or grizzly. As far as I understand, athmosphere seems to have the advantage, that it is cross container compatible.

Any experience with such a solution anybody?

Best Regards
Hanspeter

I have implemented push with CometD. It uses an embedded web container which is ideal for exposing a existing server process with an Vaadin web application.

http://www.lee-camax.com/vpush