Use icebox API as a proxy for various maps/layers/artifacts

Bug #1235227 reported by Lars Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Platform
New
Undecided
Unassigned

Bug Description

At the moment, the oq-platform is reading a bunch of layer data from various sources, including Tilestream and GeoServer. With the addition of calculation functionality built on icebox and the oq-engine-server, we also need to store layers/artifacts in icebox.

It would nice to put everything behind a single API. In other words, to get all layers, no matter where they are, we just hit the icebox API. See https://github.com/larsbutler/oq-platform/blob/dad1887d971ab5e0bf7834de0592b7fb0c96f420/openquakeplatform/openquakeplatform/icebox/icebox_api.md.

Why would we do this? If we do this, we would no longer have to hard-code static tilestream or geoserver layers into our applications (e.g., https://github.com/larsbutler/oq-platform/blob/dad1887d971ab5e0bf7834de0592b7fb0c96f420/openquakeplatform/openquakeplatform/static/js/hazard_models.js#L28). Instead, we can do the following:

1) When deploying the Platform, "static" layers (or any initial data) can be added to the icebox database.
1a) Small-ish artifacts can be stored directly in icebox as blobs (geojson, etc.). There is a storage limit here of about ~500mb, due to hard-coded postgres server limitations TEXT on fields. Probably we don't store artifacts much larger than ~250mb.
1b) Larger artifacts should be processed using something like Tilemill, when can then be stored in Tilestream. For example. A tilestream dataset is accessible via a REST API, and so instead of storing a geojson blob, we just store the URL in icebox. The client accessing this layer needs to recognize that this is a special tilestream layers and that it needs to create the appropriate layer type with the tilestream URL.
1c) The same applies to GeoServer, more or less. (See 1b.)
2) Using settings.py or local_settings.py, we can configure any specific URLs which the client needs to access (for the icebox API, oq-engine-server, whatever) and pass this information to the client via template rendering. (For an example of this, see https://github.com/gem/oq-platform/commit/f4f7e560e8e1bf8221316b94a7011e0b9ee8bc63.)
3) The client can use these URLs to access the icebox API, and from there, we get from this single location all available layers/artifacts, no matter whether the data is actually stored in icebox, geoserver, tilestream, etc.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.