-
Notifications
You must be signed in to change notification settings - Fork 103
How should we handle metadata of non-RDF sources (was Treatment of .meta files) #197
Comments
I must admit I've never really understood .meta files, and I didn't (yet) implement then in IPS. I think they are used to support setting titles on containers. Maybe we don't need .meta files in the same way we need ACL docs? Do you know if they're documented somewhere? |
Here is the most I've been able to find : https://github.com/solid/solid-spec/blob/master/content-representation.md#metadata It seems to indicate something similar to what I described as a "sidecar file" for non-RDF resources. If I want to tag a photo, or categorize an mp3, I'd like to do that in a way that is strongly associated with the resource itself. Metadata files seem ideal for this. So let's say I have a container /photos including foo.png. In foo.png.meta I describe the photo in RDF. When I do a GET on /photos it lists foo.png along with its metadata as taken from its metadata file. Container .meta files work like this in NSS now. If you have /photos and in /photos/.meta you put a triple stating that the Container is a giraffe, The next time you visit /photos, the triple stating it is a giraffe will be there just as if you had put it in the turtle. That doesn't seem all that useful for containers because we can just add triples in their turtle directly. But we can't do that with non-RDF files and it would be really useful to be able to. |
And an observation from experimenting with NSS: unlike .acl file .meta files do not block a container from being deleted. If the container has only a .acl file in it, we get a 409 if we try to delete. But if it has only a .meta file, the delete succeeds. |
I imagine metadata files working something like this:
|
The above would be an app developer's dream come true compared to all the gets and link header parsing one would need to do otherwise. As I said, containers already work like this in NSS, so maybe it would not be so much work to do the same for resources. |
Doing it as above rather than making the app get the same data would be save one extra GET on the container's meta and a HEAD on each item then a GET on its meta. That's a lot of hits. |
nodeSolidServer/node-solid-server#1040 proposes to simplify the interface for container read/write and meta handling. |
Although I obviously like the view realized with metadata, we shouldn't create a false dichotomy. The goal of "readable titles for non-RDF files" can be realized in several ways, one of which is |
I think with the exception of NonRDFSource case, the notion of "meta" as a distinct resource can disappear. |
The goal, as I understand it is to allow non-RDF resources to be described with RDF in a way that supports them becoming part of the same universe of discourse as RDF resources which can talk for themselves. Desktop apps do this by inserting data into the resource itself (e.g. digikam with EXIF, XMP, etc. data and photos). Using .meta "sidecar" files puts the data squarly outside the resource itself which brings other problems. Has anyone proposed using headers instead? A GET gives you the resource and the metadata, a HEAD gives you the metadata without the resource, there are no extraneous sidecar resources which need to behave differently from other resources. The server can implement however it wants , giving users no access to where the metadata is actually stored, only supporting user interaction via headers. |
I'm not sure if the headers is a good place for this. For navigational purposes, perhaps one can get away with Edit: I also don't think it is particularly safe to expose arbitrary properties through headers. The headers is something the server should have good control over and not easily manipulated by an application. |
I think there are ways around your first point, but your second point is probably a show-stopper. [edit: meaning : oh well, no, headers is not a good idea] |
What if the user can send a header that says only "I am talking to the metadata, not the resource" such that a GET on foo.png with that header sends back metadata and one without sends back the resource. And a PUT/POST/PATCH on foo.png with that header edits the metadata and without the header writes to the resource itself. |
In the case of the container, we could disallow modification of the container directly but allow modification of its metada by supporting PUT etc. with the metadata flag and not without. |
The user would never need to know anything about where or how the server stores the metadata and would never need to address anything but the resource itself. |
that wouldn't be very RESTy. as described, the "metadata" is more like its own resource, or at least a separate fork (especially when you say "i am talking to [...] not the resource"). the different representations that would be received or sent for the same URI wouldn't be alternate representations of the same resource, but representations of the resource or of its "metadata". in the REST+HTTP model, true metadata about the resource+representation (like its content-type, last-modified time, creator, other systemy stuff, etc) belongs in the HTTP headers, along with a representation of the resource itself in the payload, so they're transferred atomically. REST+HTTP doesn't have a good way to talk about resources with multiple forks. per our conversation in gitter yesterday, when you're talking about "metadata" here, i think you're talking about both the resource (and representation) true metadata and also "more stuff i'd say in/about this resource if it was RDF". i'll talk about that in a separate message. |
@jeff-zucker and i had an extended chat in gitter yesterday on the metadata/.meta/RDF-for-non-RDF subject, from https://gitter.im/solid/chat?at=5d239e3ef5dd1457424db97d to https://gitter.im/solid/chat?at=5d23f858b0027d2b199ab085 (sadly i don't know of a good way to copy that part of the conversation to this issue). TL;DR: my opinions on this subject:
in addition to the true resource/representation metadata being in HTTP headers and the storage implementation being hidden, i propose the "adjunct RDF for a non-RDF resource" be handled with a
that can be returned with an HTTP as an optimization, an HTTP/2 server could push a representation of the |
I agree that what @zenomt calls "true metadata" should be server-driven and belongs in the header. I also agree with him that "user generated metadata" about non-RDF does not belong in the header, rather in a separate RDF file. The link from the non-RDF resource to its user-generated-metadata should be server-generated and found in the header of the resource as in the current spec on metadata. Details about .meta or how the server actually stores do not need to be exposed to the user, other than supporting a way to edit it by following the link in the resource. I am concerned about both describedBy and seeAlso as the predicate for this link - neither carries the weight it should, which in my mind is "what the link says about the resource is as if the resource had said it." It is not the same as a random comment on an image, it has a more specific relationship with the resource, one that the server assigns and is not user alterable. Certainly the user can edit the resource the link points to if they have rights, but that does not mean that they can alter the link itself. A predicate like schema:isdefinedBy might be better. Whatever the predicate it should be described in the spec similarly to how the extended Profile talks about seeAlso - as something that client apps should be expected to follow and merge. |
on reflection and a closer reading of https://www.w3.org/TR/ldp/#ldpc-container , especially section 5.2.3.12, i think that the semantics of
(where "about" is problematic to me). if everyone agrees that "where to put RDF for this LDP-NR" is what also, perhaps state that Solid LDP servers "SHOULD NOT" [RFC2119] create a |
This will be handled in solid/specification#63 |
You may want to review this PR solid/data-interoperability-panel#32 |
As far as I can tell from testing, .meta files work for containers but not resources. It would seem that a .meta should function as a sidecar file for non-RDF resources e.g. for tagging photos or categorizing music. For that use case, they should be tightly bound to the file they reference - should be copied, deleted, etc. when the resource is copied/deleted. I also believe they should be (or have the option to be) listed with GET and editable. We'll be doing those things as much as we can from the client side in solid-file-client but it seems like it should be a server side thing and that the the spec should address it.
The text was updated successfully, but these errors were encountered: