You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reminder to discuss: What to do about the MS-Author-Via: SPARQL header? (see PR nodeSolidServer/node-solid-server#1313 for example). (I bring it up here because it's PATCH-related.)
Does it need to be added to the spec? As a MUST or a MAY?
@dmitrizagidulinIMO, we shouldn't bother to bring along a propriety header like MS-Author-Via. I don't quite see what it adds meanwhile Allow, Accept-*..
@kjetilk Anything in particular that's incorrect or inadequate? I'm assuming the key things in that example is the method and the content type.
@dmitrizagidulinIMO, we shouldn't bother to bring along a propriety header like MS-Author-Via. I don't quite see what it adds meanwhile Allow, Accept-*..
IIRC, @timbl was OK with MS-Author-Via, it is a de facto standard, and even though it hasn't (AFAIK) been through any open standardization process, there aren't any particular strings attached to it, so it can be used. The other headers don't point to SPARQL specifically.
@kjetilk Anything in particular that's incorrect or inadequate? I'm assuming the key things in that example is the method and the content type.
Basically, mainly that this is a LDP-NR, and it can't be edited with SPARQL, so it shouldn't be there in this case even if it is there for LDP-RS. Also, with ref to #118, the POST operation should possibly not be in the Allow header either.
But the observation that 415 should be used when you have no patch algo is a good one. Though for text/* it should be possible to use a diff -u patch, but AFAIK, there exists no authoratitive MIME type for that…
A bit more on the HTML and XML family: https://tools.ietf.org/html/rfc7351 and https://tools.ietf.org/html/rfc5261 is one way to have PATCH work for XML compatibles; XHTML and Polyglot markup. Unlikely to work well with HTML serialisations in general eg. those using optional tags. SVG and MathML should be fine. If a server supports XML Patch, application/xml-patch+xml will be listed in Accept-Patch.
Someone can correct me on this but AFAIK application/sparql-update is the only one we have implementation experience with, so that should probably be the only one appearing in the spec - with some requirement level.
I don't think the spec needs to bring any attention to LDP-NR or LDP-RS. Simply, if server allows certain methods cross content type for a resource, it can be known through Allow and Accept-*. That makes it possible for servers to advertise media types they support for PATCH - which is already an LDP requirement.
OK, so something around "If the server supports PATCH, it MUST advertize the media types it supports through the Accept-Patch header, and MUST respond with 415 if manipulation is attempted through other media types"? Or does this already follow from RFC5789?
Yeah, but... Perhaps I should defer commenting until I have caught up on RFC5789, but it seems terribly underspecified; It doesn't seem useful at all to know that a server supports a certain patch media type, for it to be useful, it needs to be known for each media type, or at the very least for each interaction model.
Caught up on RFC5789, and I think LDP is awkward at that point. I think it makes zero sense to add Accept-Patch to OPTIONS *, but LDP doesn't qualify that case. The RFC makes the intention much clearer than LDP does:
The presence of a specific patch document format in this header indicates that that specific format is allowed on the resource identified by the Request-URI.
I think we need to tighten this up a bit, but also make clear that you don't need Accept-Patch on OPTIONS *.
One criteria to emphasise in the Solid spec is PATCH's atomicity requirement. It is sufficiently clear in RFC 5789:
The atomicity requirement holds for all directly affected files.
and what that entails. The Solid spec will have a global atomicity requirement ( #137 ) on creating nested containers when necessary and error if not possible. So, the requirements are well aligned.
Potential errors should be reported from general (can create nested containers?) to specific (can modify resource?)
I think that to advance this, we need to free ourselves from the requirements of SPARQL Update, as the number of issues to be settled there is pretty large, and it is best done in a panel.
So, nevermind my list above, what do we really need to agree on to find rough consensus on this one?
We agree on PATCH being required. It may require one or more specified ways to perform an update. If/when SPARQL Update and other approaches are cleared, the PATCH section can refer to them.
There are other relatively minor things that's in agreement eg. PATCH appears in Allow, Allow-Patch in some places (I think for the sake of uniformity, it should also be in OPTIONS * but this is not a show stopper for rough consensus right now), atomicity expectations, .. There are no particular restrictions on the kind of resources that would allow PATCH eg. containers and regular resources can be PATCH'd. It is only the formats that's of a concern that can be addressed.
Activity
dmitrizagidulin commentedon Oct 5, 2019
Reminder to discuss: What to do about the
MS-Author-Via: SPARQLheader? (see PR nodeSolidServer/node-solid-server#1313 for example). (I bring it up here because it's PATCH-related.)Does it need to be added to the spec? As a MUST or a MAY?
kjetilk commentedon Oct 7, 2019
kjetilk commentedon Nov 15, 2019
Just wanting to post this somewhere as a note to self, since we need to specify this behaviour, which is mostly correct:
csarven commentedon Nov 15, 2019
@dmitrizagidulin IMO, we shouldn't bother to bring along a propriety header like
MS-Author-Via. I don't quite see what it adds meanwhileAllow,Accept-*..@kjetilk Anything in particular that's incorrect or inadequate? I'm assuming the key things in that example is the method and the content type.
kjetilk commentedon Nov 15, 2019
IIRC, @timbl was OK with
MS-Author-Via, it is a de facto standard, and even though it hasn't (AFAIK) been through any open standardization process, there aren't any particular strings attached to it, so it can be used. The other headers don't point to SPARQL specifically.Basically, mainly that this is a LDP-NR, and it can't be edited with SPARQL, so it shouldn't be there in this case even if it is there for LDP-RS. Also, with ref to #118, the
POSToperation should possibly not be in theAllowheader either.But the observation that
415should be used when you have no patch algo is a good one. Though fortext/*it should be possible to use adiff -upatch, but AFAIK, there exists no authoratitive MIME type for that…csarven commentedon Nov 15, 2019
Isn't
Allow: PATCH,Accept-Patch: application/sparql-updateprecise and sufficient?Wouldn't updating
text/*by any means simply left unspecified in the spec? I agree re415.kjetilk commentedon Nov 15, 2019
Actually... Yes! /me takes note to read RFC5789 in full... :-) Sorry.
Yes, it was the distinction between LDP-RS and LDP-NR that was the important part of my comment.
csarven commentedon Nov 17, 2019
A bit more on the HTML and XML family: https://tools.ietf.org/html/rfc7351 and https://tools.ietf.org/html/rfc5261 is one way to have
PATCHwork for XML compatibles; XHTML and Polyglot markup. Unlikely to work well with HTML serialisations in general eg. those using optional tags. SVG and MathML should be fine. If a server supports XML Patch,application/xml-patch+xmlwill be listed inAccept-Patch.Someone can correct me on this but AFAIK
application/sparql-updateis the only one we have implementation experience with, so that should probably be the only one appearing in the spec - with some requirement level.I don't think the spec needs to bring any attention to LDP-NR or LDP-RS. Simply, if server allows certain methods cross content type for a resource, it can be known through
AllowandAccept-*. That makes it possible for servers to advertise media types they support forPATCH- which is already an LDP requirement.kjetilk commentedon Nov 18, 2019
OK, so something around "If the server supports
PATCH, it MUST advertize the media types it supports through theAccept-Patchheader, and MUST respond with415if manipulation is attempted through other media types"? Or does this already follow from RFC5789?csarven commentedon Nov 18, 2019
Like I said, already in LDP: https://www.w3.org/TR/ldp/#ldpr-patch-acceptpatch
I think that's just RFC 7231.
kjetilk commentedon Nov 18, 2019
Yeah, but... Perhaps I should defer commenting until I have caught up on RFC5789, but it seems terribly underspecified; It doesn't seem useful at all to know that a server supports a certain patch media type, for it to be useful, it needs to be known for each media type, or at the very least for each interaction model.
kjetilk commentedon Nov 19, 2019
Caught up on RFC5789, and I think LDP is awkward at that point. I think it makes zero sense to add
Accept-PatchtoOPTIONS *, but LDP doesn't qualify that case. The RFC makes the intention much clearer than LDP does:I think we need to tighten this up a bit, but also make clear that you don't need
Accept-PatchonOPTIONS *.19 remaining items
JordanShurmer commentedon Nov 26, 2019
@kjetilk all of the section 4 sub-sections apply only to resource requests.
From the non-normative introduction, which is not normative but can help resolve ambiguities:
More importantly, 4.2.7.1 explicitly refers only to ldp resources:
kjetilk commentedon Nov 26, 2019
Hmmm, right, that's a good point.
kjetilk commentedon Nov 26, 2019
Wrote an overview of what we need to consider for SPARQL Update in #125 , and it got pretty lengthy.
csarven commentedon Jan 12, 2020
Jotting this down for later:
One criteria to emphasise in the Solid spec is PATCH's atomicity requirement. It is sufficiently clear in RFC 5789:
and what that entails. The Solid spec will have a global atomicity requirement ( #137 ) on creating nested containers when necessary and error if not possible. So, the requirements are well aligned.
Potential errors should be reported from general (can create nested containers?) to specific (can modify resource?)
kjetilk commentedon Jan 16, 2020
I think that to advance this, we need to free ourselves from the requirements of SPARQL Update, as the number of issues to be settled there is pretty large, and it is best done in a panel.
So, nevermind my list above, what do we really need to agree on to find rough consensus on this one?
csarven commentedon Jan 16, 2020
We agree on PATCH being required. It may require one or more specified ways to perform an update. If/when SPARQL Update and other approaches are cleared, the PATCH section can refer to them.
There are other relatively minor things that's in agreement eg. PATCH appears in Allow, Allow-Patch in some places (I think for the sake of uniformity, it should also be in OPTIONS * but this is not a show stopper for rough consensus right now), atomicity expectations, .. There are no particular restrictions on the kind of resources that would allow PATCH eg. containers and regular resources can be PATCH'd. It is only the formats that's of a concern that can be addressed.
kjetilk commentedon Jan 16, 2020
Right, and since we have freed ourselves somewhat from the shacles of LDP since we had most of the discussion, I think we can go for something like
OPTIONS *MUST includeAllow: PATCH, MAY includeAccept-Patchwith a list of media types.HEAD,GETandOPTIONSon the resource itself, MUST includeAllow: PATCH, and MUST includeAccept-Patchwith a list of media types.PATCHed, it is just whether there is a media type that determines it.415if it doesn't.Then, we need to say something around atomicity.
Is that it? Can we move to rough consensus?