3 ms·
In designing PhotoStructure, I've wrestled with many of the issues you outline in your article. * I pretty quickly switched from flat tags to hierarchical tags
by mceachen 6y ago
In designing PhotoStructure, I've wrestled with many of the issues you outline in your article.
* I pretty quickly switched from flat tags to hierarchical tags, though, for expressiveness, presentation, and organization.
* I also found it necessary to create a "Asset" that has 1 or more "AssetFile" instances, each with a stable URI and SHA. This scheme supports variant grouping (which is quite common due to backups and jpeg+raw pairs).
* The "stable" bit of the URI includes the physical volume UUID, so changing mountpoints don't perturb the underlying AssetFile URI.
* I originally used a prefix on the SHA to support multiple algorithms, but found it to be too expensive for subsequent lookups to need to calculate n different SHAs. Instead, there's now a "version" for both Assets and AssetFiles and individual libraries are migrated to new versions automatically (which supports changing SHA algorithms, for example, when that's indicated).