-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evolve best practices on URLs #1325
Comments
I agree with this except I prefer absolute asset hrefs. I find that STAC is much more mobile than assets. You copy STAC down into some local data store, you load them into a backend, whatever, but the assets stay put. I even think that co-hosting STAC and assets might (hot take alert 🌶️ ) be an anti-pattern. I don't think self-contained catalogs are very useful at all (I think @matthewhanson agrees with me on this but could be mis-remembering) and would be 👍🏼 on removing them from the best practices. I don't love "Absolute Published Catalogs" either, I don't really see what advantage they have over the Matthias's Preferred Approach™ — the tooling is generally good enough to resolve relative links, so I think the complexity win of removing "Absolute Published Catalogs" is worth it. So, to summarize:
I think there's an advantage in having "one preferred way" in the Best Practices, with some discussion on why you might tweak, e.g. why you would choose absolute or relative asset hrefs. |
I agree with best practices that assets should stay put and require an absolute link. STAC is a signpost to the data, after all. |
Haha, I guess we can find a better name :-P Thanks for your inputs. I don't feel strongly about rel vs abs assets. As you two advoate for it, what's the benfit of having an absolute links? I don't find a good reason yet why this should necessarily be absolute if there's an absolute self link. Could you elaborate on that? @gadomski @jbants |
I think the benefit is as a signalling mechanism, i.e. how we think STAC should be used. By recommending absolute asset hrefs but relative links, we tell folks "you can and should STAC around as much as you want, but you probably want to keep your assets in one place." Relative asset hrefs make it feel like the STAC should live next to the assets, which (at least to me) feels a little wrong. |
Regarding assets only: Okay, so it's the moving aspect. On the other hand, for me relative hrefs would keep the maintenance burden a bit down as you only have to update one href (self link). Maybe we don't recommend anything and leave it up to users? I only see minor pros/cons so far for absolute/relative hrefs respecitively, so maybe not worth a best practice yet? |
Sorry, just to be clear, I am advocating for relative links and absolute assets. |
Sorry, also just to be clear: I was just talking about assets above, links in this context is highly ambiguous (didn't realize) and so I just replaced links with href above. Please reread ;) (I'm advocating for no best practice regarding assets, I guess). |
Here's my null-hypothesis best practice for asset hrefs:
Because those break-points are so fuzzy, maybe our guidance should be "pick one (relative or absolute) for asset hrefs and stick with it, and if they're big (e.g. lidar) they should probably be absolute". |
The best practices on https://github.com/radiantearth/stac-spec/blob/v1.0.0/best-practices.md#use-of-links seem partially ambiguous and may have evolved a bit.
We have the following in the best practices:
The approach that I recommend is:
STAC Browser also recommends what I recommend (unsurprisingly ;-) ) or the Absolute published catalog. Those two generally work best for STAC Browser as it can generate absolute self links for an entity without requesting the root via additional request. It seems that this type is not reflected in the best practices though. I feel like the best practices should evolve a bit and may even be simplified.
The cases above come up very naturally, the difference is usually the self links. Everything else should just be consistently being used for STAC links and assets. Depending on the given hosting context the assets are also often just absolute.
Thoughts? Otherwise, I'll try to create a PR soon...
The text was updated successfully, but these errors were encountered: