solid / solid-spec

Solid specification draft 0.7.0
Creative Commons Zero v1.0 Universal
1.13k stars 103 forks source link

globbing need to be follow your nose #34

Open bblfish opened 9 years ago

bblfish commented 9 years ago

Currently the globbing feature is not advertised. A client cannot know that a server supports it. There should either be a Link header of type ldp:globed or the LDPC should have that link following the patterns set by the LDP spec.

sandhawke commented 9 years ago

Agreed. I probably wouldn't call it "glob" though. Outside a very small niche, it's called a wildcard, right? And is it (or should it be) a wildcard like http://foo.example/a*/b*/c*d/e ? or is it only to be used like http://foo.example/a/b/c/* ? If that's all it is, it should be called container inlining.

bblfish commented 9 years ago

More questions I have:

deiu commented 9 years ago

Globbing is just a pattern matching feature of Unix-like systems. It does not return a tar.gz file, or any type of archive. I've added a couple of examples to show how globbing works in SoLiD. I hope this clears the confusion.

While there is currently no "follow your nose" mechanism to advertise globbing support, I hope that the proposed server preferences feature of LDP Next will fix this issue.

bblfish commented 9 years ago

@deiu , you can't just close an issue without asking the person who opened it if they agree with your answer. Currently your answer suffers from the following problems:

Can you please re-open the issue.

deiu commented 9 years ago

Globbing only applies to RDF resources (now properly reflected in the spec text).

bblfish commented 9 years ago

Why is that restriction a reasonable one? It would help if you started out with use cases for globbing. Furthermore the merging of all content requires the graphs to be returned to all be coherent, which I think is much to strong a requirement, meaning it will rarely be satisfiable, and rarely in an automatic way. Ie. What you'd have to specify is the requirements on consistency that you assume before you can specify it.

That is why I suggested multipart results.

deiu commented 9 years ago

@sandhawke it is actually called glob: https://en.wikipedia.org/wiki/Glob_(programming)

melvincarvalho commented 9 years ago

@sandhawke Container inlining is a nice name.

I use ldpc/* a lot and is a huge optimization for apps. It's something I cant imagine living without.

The other types of wild cards I dont use and cant imagine using.

There's also the issue of escaping * in a URI ... tho I wonder was it a reserved character already?

I'd suggest using it just on ldpc/* right now. Implementation experience is going to be a good guide here too, imho.

deiu commented 9 years ago

@bblfish multipart results is a reasonable improvement over the current way of doing globbing. I'll try to implement it to see how well (easy) it is to work with.

sandhawke commented 9 years ago

@deiu unix shells do a particular kind of wildcarding called globbing. This is not that kind of wildcarding, in either syntax (no support for ?? or {} or [] etc) or in semantics (globbing simply replaces the pattern string with its expansion list, so it only makes sense in contexts which support multiple arguments). I suppose to people who've only used unix, this isn't an important distinction.