Problems with Push support in Vaadin

Hi everyone,

I’m having some serious issues with the Server Push support in Vaadin 7, and it’s proving difficult to pin down the problem. I’ve followed all the steps in the Book of Vaadin on enabling server push, including adding the vaadin-push.jar file to WEB-INF/lib, adding the “asyncSupported = true” parameter to the @WebServlet annotation, and adding the @Push annotation to the UI class. (I’ve also tried specifying the equivalent in the deployment descriptor.) I also added the org.atmosphere.useWebSocketAndServlet3=true property to the catalina.properties file of my Tomcat 7 server, as suggested in https://vaadin.com/wiki/-/wiki/Main/Working%20around%20push%20issues.

I found the Server Push support to be very quirky, making it difficult to identify the problem. For instance, when developing code, the server will often not automatically re-start; only recognizing new code when I close the browser (not just the browser window), stop the server and re-start Eclipse; missing any of these steps will result in the Server Push not working. Note that this issue only occurs when Server Push is enabled. I read something about sessions not expiring when push is enabled (https://vaadin.com/forum#!/thread/3576361), so maybe that’s the reason…

I often encounter suspicious log messages:

Mar 02, 2014 9:25:45 PM com.vaadin.server.communication.PushHandler$3 run WARNING: Could not find push connection to close: 38450652-2a2b-4221-8300-8313e9c4779a with transport WEBSOCKET 

Mar 02, 2014 9:25:45 PM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load java.nio.ByteBuffer.

It does seem that the Atmosphere is finding the async support:

INFO: Atmosphere is using async support: org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket running under container: Apache Tomcat/7.0.47

I also found this error; don’t know whether it indicates a serious problem (haven’t tried resolving it, since I don’t want to get into the Atmosphere stuff):

WARNING: No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache

That said, Firefox works quite well with the Server Push, while Chrome has problems and IE spews errors (surprise!). In particular, Chrome often takes quite a while to communicate a UI interaction (e.g., button push) to the server, whereby a spinner (changing color from yellow to orange to red) appears at the right top. IE simply updates the wrong UI components when multiple windows are open. So, as long as every user employs Firefox there’s no problem, but I can’t possibly assume that.

I came across this post, where developers vented their frustration on the feature:https://vaadin.com/forum#!/thread/4040408. This is quite a recent post, so it doesn’t sound too promising… The only reason I need the Server Push feature is to allow the ChatBox add-on (https://vaadin.com/directory/-/directory/addon/chatbox) to update in real-time.

Any ideas? Has anyone gotten these kinds of errors and managed to get some workaround? Or even better, has anyone gotten the ChatBox add-on to work with the Server Push?

Thanks,

William

Come on guys, I thought Vaadin had an active community… This is the third question I’ve posed here without getting a single response…

Answer on SO : http://stackoverflow.com/questions/22137554/problems-with-push-support-in-vaadin?noredirect=1#comment33739271_22137554

Hi William,

I’m sorry that our forum let you down again :frowning:

I have to admit, that I’ve been really lazy at reading the forum for the past year or so, and that perhaps I’m not alone on that. But I feel that todays release of the new version of this forum platform (a.k.a. Tori), I’ll be more active again, since browsing and posting is very fluent and painless again :slight_smile:

Anyhow, great that you got an answer on SO. I’ll forward this topic to our team who’s responsible for the push support.

Like many others, I’ve tried to get push working, but the internet keeps getting in the way…
I read the ‘answer’ in SO mentioned above . . .hmmm, not sure that reverting to the old polling is a real answer, but at the moment I guess that’s all there is.
To be clear though, myself and most of us on this forum do understand the truly collosal problem of trying to get push working on the ‘wild west’ plethora of internet systems. Vaadin is the only framework that even comes close to getting push working a little…someday it will all come together and we’ll all live in harmony!

The “No BroadcasterCache configured.” warning is unlikely to be a problem. And it is resolved in Vaadin 7.2.0.beta1. See
this bug report
for details.