Automatically update layers in GeoServer - layer

I am working using the OpenGeo Suite program on Windows, to create a live map that updates when changes are made to the PostGIS table the layer is based on. However, this is not possible to do unless the layer is reloaded back into the GeoServer. Is there any way of making this process automatic. Thanks

Related

Save history of incremental changes of the flow without cloning them in Mosaic Decisions

While configuring a particular data pipeline in Mosaic Decisions, I want to try out different operations by using the available process nodes. I would like to keep the first few configured nodes for future reference and continue to add some other nodes.
To do this, I'm currently cloning the flow after each incremental change. But, due to this, many flows are getting configured and it becomes very difficult to keep track.
Is there any alternative way to save the history of these multiple configurations of the flow for future reference without cloning and executing them separately?
You can save the history of changes you have made in the flow by simply saving it as a version using Save As Version option provided in the canvas header.
You can also add a description for each of the incremental steps and edit a particular version later if you want. Later, you can also execute each of the saved versions separately by publishing that version from the Version tab and then
executing it normally.

Is there a way to detach model object instances from the database?

I'm trying to figure out a way to serialize an activejdbc model from a server application running on a JVM across the wire to another JVM that is running a GUI application. The GUI application does not have access to the database, since it is not on the same machine. On the GUI, when I try to set the properties on that model instance via a setter, to update some fields to send the model back to the server to be updated, I obviously get exceptions about not having a database connection.
I have a way to get around this by overriding the getMetaModeLocal() method, but was wondering if there was a cleaner solution to this?
The exception is as follows:
Caused by: org.javalite.activejdbc.DBException: Failed to retrieve metadata from DB, connection: 'default' is not available
at org.javalite.activejdbc.Registry.init(Registry.java:133)
at org.javalite.activejdbc.Model.getMetaModel(Model.java:67)
I expect to be able to update the model without having to have a database connection until saveIt() has been called.
You have two options for this:
Do not use models in your GUI app. On the server side you can serialize models into Maps by using a Model.toMap() method and simply sending a map to the UI. If you need to make updates, you can set new values to that same map and then send it back to the server side, where you can use a model.fromMap(map).save() approach. In other words, no need to send models across the wire.
Wait till this is fixed: Add ability to use model classes without connecting to the DB. This new feature is currently in active development, and completion is projected within a couple of weeks. It will allow you to pass models from one JVM to another without the database because the DB schema will be queried during the build rather than at run time.

How to setup a project and break it into sub-projects, how to use slick in this setup

This is a brand new project, so I can use the latest version of play.
I am using IntelliJ 13.
So I want to break the models/db/service layer because I will also have a job service (reading messages off a queue for example) that will need this server layer also.
Since slick is outside of play, how do I setup the datasource for this project, keeping in mind I will be connecting to multiple databases.
Do I need to create a custom config file for this?
web-app (play2!)
- service
service (models + dao)
models
dao
jobs (service)
I don't see any examples like this, which I find strange because I think pretty much any project would have to be setup this way in the real world (beyond simple examples).
Can someone show be sample code where things are broken down like this?
This example isn't broken into sub-projects, but it is very split up and would allow you to specify multiple databases.
https://github.com/geigerma/play-cake

Titanium remote images initial run

My issue:
I want my application to have an initial data set, including images, for the first run.
But after that if the user connects to the internet, they can download newer images.
From what i can google, the way to do that is to use image caching.
How do i do initial caching of the images for the first run on the application? (if the application runs offline the first time)
You can put initial files inside your project and Titanium will include them during build process. To update them in the future you have to use Titanium.Filesystem.File object.

Core Data Alternatives on iOS

I've been developing several iOS applications using Core Data and it has been an excellent framework to work with. However, I've encountered an issue whereby we more or less have distributed objects (synced) across multiple platforms. A web/database server backend and mobile devices.
Although it hasn't been a problem until now, the static nature of the data model used by Core Data has me a little stuck. Basically what is being requested is a dynamic forms system whereby forms can be created on a server and propagated to the devices. I'm aware of the technique for performing this with a set number of tables with something like:
Forms table
Fields table
Instance of Forms table
Instance Values table
and just linking everything together. What I'm wondering however is if there is an alternative system to Core Data (something above talking to an SQLite database directly) that will allow for a more dynamic object graph. Even a standard ORM would be good if there are options for modifying the schema at runtime. The main reason I want to go down this route is for performance in the sense that I don't want the instance values table exploding with entries (on the local device or server).
My other option is to have the static schema (object-graph) on the iOS devices but have a conversion layer on the server's side which fetches the correct object, populates the properties and saves it to the correct table. Then when the devices comes to sync, it does the reverse and breaks it down into instances. While this saves the server from having a bloated instance value table, it could still be a problem on the device.
Any suggestions are appreciated.
Using specific tables/entities for forms and fields, and entities for instances of each, is probably what I would recommend. Trying to manipulate the ORM schema on the fly if it's going to be happening frequently doesn't seem like a good idea in general.
However, if the schema is only going to change infrequently, you can probably do it with Core Data. You can programatically create and/or manipulate the NSManagedObjectModel prior to creating a NSManagedObjectContext. You can also create migration logic so data stored in an old model can be preserved when you update the model and need to recreate the context and stores.
These other SO posts may be helpful:
Customize core data model at runtime?
Handling Core Data Model Changes
You need to think carefully about what you are actually modeling.
Are you modeling: (1) the actual "forms" i.e. UI elements, (2) data that might be presented in any number of UI versions e.g. firstName or (3) both?
A data model designed to model forms would have entities like:
Form{
name:string
fields<-->Field.form
}
Field{
width:number
height:number
xPos:number
yPos:number
label:sting
nextTab<-->Field.priorTab
priorTab<-->Field.nextTab
form<<-->Form.fields
}
You would use this to store data about form as displayed in the user interface. Then you would have a separate entities and probably a separate model to store the actual data that would populate the UI elements that are configured by the first data model.
You can use Core Data to modeling anything you just need to know what you are really modeling.