ServerPush for Vaadin
A component that adds TRUE push support with a variety of push methods to Vaadin!
There are two methods for using this add-on:
- Use regular Vaadin servlet and manually add ServerPush widget to application as well as manually call push() when you want to push to client(s)
- Use ServerPushApplicationServlet instead of the default Vaadin servlet (ServerPush widget is automatically added at the bottom of main window upon new Application creation)
The difference between the two methods is that the former requires explicit calling of push() by the developer, which allows the developer control over when updates are pushed, whereas the latter method provides a seamless push on every repaint request with no explicit calls to push(). The latter method is also much more aggressive in pushing updates to the client(s) since it is invoked on every repaint request.
This component is based on the Atmosphere Framework 0.7.2, which can be configured to use one of four push methods:
- Blocking I/O (also acts as a fallback for the next three)
- Native Comet support in app server
- Servlet 3.0 Async
The best available method will be chosen unless explicitly told which method to use in the Atmosphere servlet configuration.
Make sure that you add the Atmosphere and SLF4J JARs to your WEB-INF/lib. Note that Atmosphere uses SLF4J and this add-on only includes the API JAR; therefore, users of this add-on will need to add a concrete implementation of this API to the app (log4j, java.util, simple, etc.).
NOTE: All samples are in GitHub; they are not included in the download.
NOTE: This add-on is no longer actively developed. I have moved my efforts to DontPush OzoneLayer in conjunction with Matti Tahvonen which is a much more elegant solution that does not require a Component to be added to a Window. New project at: https://vaadin.com/directory#addon/dontpush-ozonelayer