ngageoint / hootenanny

Hootenanny conflates multiple maps into a single seamless map.
GNU General Public License v3.0
353 stars 74 forks source link

Hoot-services: OgrAttributesResource should cache responses by file hash #380

Open brianhatchl opened 8 years ago

brianhatchl commented 8 years ago

The resource accepts an uploaded shapefile, fgdb, or zip file and computes the unique attribute values for fields in each layer. This processing can be expensive and the result is relatively small, so cache the result by input file hash so that subsequent retrievals will be instantaneous.

treycaldwell commented 8 years ago

After digging through the code investigating this, I uncommented the UI portion from the file upload dialog in order to get the server to run the script. The script fails indicating "Unable to open: DcGisRoads.gdb" after attempting to upload test-files/service/FileUploadResourceTest/DcGisRoads.gdb. I spoke with @sisskind and he indicated this never "worked" and was probably better suited to another external tool. Waiting to see if this is still a worthwhile task.

treycaldwell commented 8 years ago

After speaking with @brianhatchl he was invoking this by uploading files in Translation Assistant (not adding a Dataset) and it was working there. There was also discussion about whether to cache this json in the database or on the file system like translations. Basically, the only information stored for this task would be the uploaded file's SHA and the json produced by hoot. It was decided to put this task on the back burner.