Closed
Conversation
Member
grantfitzsimmons
left a comment
There was a problem hiding this comment.
S3 is suitable for large, infrequently accessed resources, such as default taxon trees, which work well on demand. For essential components that are always required for basic app functions, like always populated defaults and leaflet layers, we should not need to access an external server.
To clarify, only the geography and geologictimeperiod trees need to be local, not the taxon trees. I think having those be independent and downloaded on-demand is a better approach ^
Member
Author
|
New implementation here #7821 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of accessing default tree files remotely, we decided to add them to the repo so that each Specify instance would have the needed files locally. This allows users without internet access to do the important process of setting up default trees locally. We also compressed the default csv files to save on storage space when user's pull the latest code from the repo. The default_trees directory was originally 156.1 MB, and now is 19.9 MB after compression. The code for making the requests for the files has been changed to reflect the new file locations.
No new api calls were needed, just using the existing
/static/config/...api now to get the default tree files. This is used, instead of the remote call tospecifysoftware.org/taxonfiles/.... We also added theleaflet-layers.jsonto the local config directory, since it was being frequently called tofiles.specifysoftware.org, so now it can be retrieved from/static/config/default_trees/taxonfiles.json.Also note in the implementation that we needed to add local mapping files for the setup preload of Geography and Geologic Time Period trees in order to get them to work.
There are three places in the application where when need to confirm that the new default trees files are requested. Those being the setup tool, the configuration tool, and the tree viewer.
Checklist
self-explanatory (or properly documented)
Testing instructions
taxonfiles.jsonwas to/static/config/default_trees/taxonfiles.jsoninstead ofspecifysoftware.org/taxonfiles/taxonfiles.json.taxonfiles.jsonwas to/static/config/default_trees/taxonfiles.jsoninstead ofspecifysoftware.org/taxonfiles/taxonfiles.json.taxonfiles.jsonwas to/static/config/default_trees/taxonfiles.jsoninstead ofspecifysoftware.org/taxonfiles/taxonfiles.json.