You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's the sequence of steps I'm still working on:
Add a collect_params() function to create a unique ID from the set of input parameters (variable, depth, time, spatial, etc). These parameters are input into a yaml metadata file, which gets fed into a digest and returns a unique hash (i.e. a unique ID, e.g. 16 characters in length). This hash, or unique ID, allows us to reuse outputs, i.e. cached results, without having to re-render. The database record will include a **date_created** and **date_accessed**, so old outputs that haven't been accessed for a long time and are taking up space can be deleted. Pre-rendering and storing the renderings for common defaults will keep the app zippy, especially with concurrent requests.
Update API render_map() function. Receive parameter inputs from the API into this function, that calls the collect_params(), a function and looks for cached result before returning desired result. Based on the explore_pg_contour script, one of either two outputs could be returned:
the initial raster interpolated from the point observations; or
the filled contoured polygons (generated by contouring the raster)
Update the app to work with the API by sending to the API parameters chosen from the user interface (ui) and visualizing the response, either raster or contoured polygons (default).
I started with trying to do things directly in the app, and the code became quite unwieldy, so the API and app seperation takes more time but is much more robust as far as maintenance, diversity of access (i.e. from R alternatively to the app), and responsiveness of the app (not hanging on one user while database querying happening for another).
The text was updated successfully, but these errors were encountered:
Here's the sequence of steps I'm still working on:
Add a
collect_params()
function to create a unique ID from the set of input parameters (variable, depth, time, spatial, etc). These parameters are input into a yaml metadata file, which gets fed into a digest and returns a unique hash (i.e. a unique ID, e.g. 16 characters in length). This hash, or unique ID, allows us to reuse outputs, i.e. cached results, without having to re-render. The database record will include a**date_created**
and**date_accessed**
, so old outputs that haven't been accessed for a long time and are taking up space can be deleted. Pre-rendering and storing the renderings for common defaults will keep the app zippy, especially with concurrent requests.Update API
render_map()
function. Receive parameter inputs from the API into this function, that calls thecollect_params()
, a function and looks for cached result before returning desired result. Based on the explore_pg_contour script, one of either two outputs could be returned:Update the app to work with the API by sending to the API parameters chosen from the user interface (ui) and visualizing the response, either raster or contoured polygons (default).
I started with trying to do things directly in the app, and the code became quite unwieldy, so the API and app seperation takes more time but is much more robust as far as maintenance, diversity of access (i.e. from R alternatively to the app), and responsiveness of the app (not hanging on one user while database querying happening for another).
The text was updated successfully, but these errors were encountered: