I try to implement a fleet tracking application with PostGIS, Geoserver, Openlayers Addon and Vaadin.
Selecting the displayed vessels, applying temporal filters, getting detailed info by clicking vessels on the map etc. should be done with Vaadin.
GPS positions are written to Postgres/PostGIS DB, a Geoserver runs a PostGIS Layer on this. This runs so far.
Another layer gives me a map. Combining the two layers in e.g. Qantum GIS works. Refreshing the display manually updates the
GPS points as they have entered the database.
Consuming the two layers via WMS with pure Javascript OpenLayers (before trying with the Vaadin addon) works also - but static:
Refreshing the browser does not refresh the GPS positions when the DB changes.
Maybe the browser has no clue the page has invalidated and still delivers the cached version.
After a lot of googling I also tried things like
var refreshStrategy = new OpenLayers.Strategy.Refresh({interval: 3000,force: true});
refreshStrategy.setLayer(wmslayer);
refreshStrategy.activate();
Still no update. Even pure JavaScript OpenLayers seems to have its problems here. I could imagine some Ajaxian / Websocket stuff, but don’t find examples.
Now I’m not sure how all this updating stuff from DB to Vaadin UI can work. I do not know the implications of the add-on wrapping approach to things like refreshes.
Even pure JavaScript OpenLayers seems to have its problems here.
What strategy would you recommend to get a clean, robust architecture for a Vaadin approach on auto-updating layers ?
Peter