- From: Sandro Hawke <sandro@w3.org>
- Date: Tue, 25 Feb 2014 12:34:37 -0500
- To: Linked Data Platform WG <public-ldp-wg@w3.org>
[This is not Last-Call critical. Just flagging an item for future
work, when I'm thinking about it.]
We closed ISSUE-15 (sharing binary resources and metadata) by saying
that the server MAY provide metadata via rel=describeby. (Typo -- the
spec says describedBy.)
In the spec, and in my memory of the discussions, we never provided a
way for the client to provide metadata. This leaves the problem mostly
unsolved.
What follows is some brainstorming about how to solve this. My best
solution is at the end.
My first thought was to mandate the server MUST create and link to an
empty metadata resource. Then the client can PUT/PATCH there. But I
think there's a problem with that timing window. I expect there will
be other clients and processes waiting for NRs to appear, and which will
begin to do things with them immediately. If the metadata doesn't
appear for one or two RTTs, that could be problematic.
Probably the clean solution, though it's a little more complex, is to
use multipart/related (RFC-2387). I don't know all the details of how
that's supposed to work, or works in practice, though.
I guess we can just leave this to some future guidance on
multipart/related. And I guess if one were going to use
multipart/related, one could also allow multiple new Contained resources
to be created at once, which could be useful.
Or maybe use multipart/form-data (RFC-2388), so that users COULD just
use an uploading from a client to post to a server. That would require
a bit of a hack in pre-determining how ldp:Container resources handle
field names.
Oh, this gets really messy, since the metadata wont know the URL for
itself OR the thing it's describing. It can use the empty URL for one
of those, but not both. I guess it uses the empty URL for the thing
it's describing and can't refer to itself, ... but that could be bad, too.
Okay, okay, best solution:
1. POST an empty text/plain resource.
2. Pray the server creates a companion metadata resource
- you could strongly hint that it should by doing a GET
Prefer: follow-link rel=describedby
3. Fill in the metadata
4. PUT to replace the text/plain thing with the real thing.
-- Sandro
[1] http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1
Received on Tuesday, 25 February 2014 17:34:45 UTC