|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: Request for feedback: HTTP-based Resource Descriptor DiscoveryLet's work out this redirection case, since nothing else matters if we can't agree on this. I'll get back to your other questions later. The problem with your treatment of redirects is that the protocol can give the wrong answer. The situation is that we do a GET/HEAD of a URI U, and receive a 301/302/307 specifying Location: V. Your protocol is supposed to get a description resource for the resource "identified" (RFC 3986) by U, yet you will throw away a DR in the response to GET/HEAD U (one that is explicitly said to be a DR of U) and look for one in the response to GET/HEAD V instead. What makes you think that V names the same resource as U? If it doesn't, V's DR has no bearing on the resource named by U. Even if you assume they do name the same resource (which you can't in the 307 case), why would you have any reason to prefer the V DR to the U DR? The ability to serve a resource's representations does not necessarily make you better qualified than anyone else to describe it. You may want to say: Well, the U and V resources have the same representations (GET behavior), so doesn't that mean they're the same resource? I don't think it follows. In particular there are other methods to consider, such as POST. As far as I know all GETs can be the same and the resources can still be different. The only theory I know of for deciding which resource is supposed to be named by a URI is that articulated in the W3C web architecture recommendation [1]. This says that it is up to a party known as the URI's "owner" to bind the URI to some resource. So if you want to learn about a named resource, it is up to the URI owner to determine what resource it is you want to learn about. Why should you talk to anyone else, if the owner is willing to speak (via Link:)? I think it is practical and reasonable that *if* U's owner provides no DR, then we can risk taking a 301 redirect (and maybe 302) to mean that V names the same resource, so that V's DR, if any, describes that resource. But an explicit Link: on a redirect has to mean that the URI owner, who is an "authority", is trying to say something important to you about the resource, such as the ways in which it differs from the redirect target. Even if U and V are assumed to name the same resource, or resources that cannot be distinguished, it is very easy to come up with cases where either DR is vastly preferable to the other; differences in credibility due to deception, reliability, competence, and timeliness can go either way. If you ask a librarian, they will say that the original publisher (V) is rarely to be trusted to provide good metadata, and one should consult a competent metadata service to obtain such (U). (This is a real use case.) There is a practical reason to prefer the U DR: it can be obtained in one roundtrip, while getting the V DR takes two. I also wonder how the redirect case is any different from that of a proxy server that adds a Link: header. If you could detect that the proxy server added it, and not the origin (you can't), would you throw away the proxy server specified DR, even when the origin provided none? -Jonathan [1] http://www.w3.org/TR/webarch/#uri-assignment |
|
|
RE: Request for feedback: HTTP-based Resource Descriptor DiscoveryWhat we want is a resource descriptor, not URI descriptor. It is clear that a URI descriptor discovery must not allow any secondary requests. Whatever you find after a single GET/HEAD of the dereferenced URI is what you are going to use. The answer seems to be that the descriptor location is obtained from whatever the client considers a valid representation of the resource. From recent discussions, there seems to be consensus that the Link header is between two resources (not representations). Link headers (due to the nature of HTTP) are attached to a representation, but their subject is the resource itself. <LINK> elements have similar semantics. Therefore, the discovery spec, instead of providing a single workflow (i.e. follow redirects, look for 200 or 303, etc.) needs to pass the decision of which Link headers to use to the client. This can be even more complex if a 301 header includes Links and the 200 header (followed from the 301) does not, but offers an HTML representation with <LINK> elements. If you consider your example below, which Link header to use (the one attached to the 301 response or the 200 obtained by following the 301 redirect), the answer is the Link header attached to the representation of the resource the client is interested in. It is perfectly valid for different representations to include different Links (as long as the Links are not representation specific, just more applicable). For example, descriptor discovery of web pages intended for consumption using a browser will usually ignore Link headers on the 301 and fetch those on the 200. Why? Because that is the resource they are actually interested in. The always follow redirects blindly, and the intermediate URIs are ignored and hidden from the end user. In other words. If you have a URI U which redirects you to URI V, the decision which RD to use (DR U or RD V) is completely tied to which representation is more relevant to your inquiry. This was somewhat hidden in the spec with regard to <LINK> element because it ignores how the client got from the resource URI to the HTML document. But it suffers from the same ambiguity. The problem, of course, is find a way to define it in an interoperable way. EHL > -----Original Message----- > From: Jonathan Rees [mailto:jar@...] > Sent: Saturday, January 31, 2009 8:55 PM > To: Eran Hammer-Lahav > Cc: www-tag@...; Phil Archer; Mark Nottingham; www-talk@... > Subject: Re: Request for feedback: HTTP-based Resource Descriptor > Discovery > > Let's work out this redirection case, since nothing else matters if we > can't agree on this. I'll get back to your other questions later. > > The problem with your treatment of redirects is that the protocol can > give the wrong answer. > > The situation is that we do a GET/HEAD of a URI U, and receive a > 301/302/307 specifying Location: V. Your protocol is supposed to get a > description resource for the resource "identified" (RFC 3986) by U, > yet you will throw away a DR in the response to GET/HEAD U (one that > is explicitly said to be a DR of U) and look for one in the response > to GET/HEAD V instead. What makes you think that V names the same > resource as U? If it doesn't, V's DR has no bearing on the resource > named by U. Even if you assume they do name the same resource (which > you can't in the 307 case), why would you have any reason to prefer > the V DR to the U DR? The ability to serve a resource's > representations does not necessarily make you better qualified than > anyone else to describe it. > > You may want to say: Well, the U and V resources have the same > representations (GET behavior), so doesn't that mean they're the same > resource? I don't think it follows. In particular there are other > methods to consider, such as POST. As far as I know all GETs can be > the same and the resources can still be different. > > The only theory I know of for deciding which resource is supposed to > be named by a URI is that articulated in the W3C web architecture > recommendation [1]. This says that it is up to a party known as the > URI's "owner" to bind the URI to some resource. So if you want to > learn about a named resource, it is up to the URI owner to determine > what resource it is you want to learn about. Why should you talk to > anyone else, if the owner is willing to speak (via Link:)? > > I think it is practical and reasonable that *if* U's owner provides no > DR, then we can risk taking a 301 redirect (and maybe 302) to mean > that V names the same resource, so that V's DR, if any, describes that > resource. But an explicit Link: on a redirect has to mean that the URI > owner, who is an "authority", is trying to say something important to > you about the resource, such as the ways in which it differs from the > redirect target. > > Even if U and V are assumed to name the same resource, or resources > that cannot be distinguished, it is very easy to come up with cases > where either DR is vastly preferable to the other; differences in > credibility due to deception, reliability, competence, and timeliness > can go either way. If you ask a librarian, they will say that the > original publisher (V) is rarely to be trusted to provide good > metadata, and one should consult a competent metadata service to > obtain such (U). (This is a real use case.) > > There is a practical reason to prefer the U DR: it can be obtained in > one roundtrip, while getting the V DR takes two. > > I also wonder how the redirect case is any different from that of a > proxy server that adds a Link: header. If you could detect that the > proxy server added it, and not the origin (you can't), would you throw > away the proxy server specified DR, even when the origin provided none? > > -Jonathan > > [1] http://www.w3.org/TR/webarch/#uri-assignment |
|
|
Re: Request for feedback: HTTP-based Resource Descriptor DiscoveryEran, Jonathan, I've been catching up with this thread this morning. The discussion around redirects shows that it's not a simple matter. In POWDER we basically chickened out and said that how redirects are handled is application-specific. We get away with this because what a POWDER DR describes is defined within the POWDER doc, and who published it is always explicit. Therefore whether you follow an Link: on a 301 response is irrelevant, the data you eventually get, however you get it, is self-contained. However, the particular line that caught my eye in this thread was: [..] [JR] >> - I think you need to warn that this protocol should only be applied >> to URIs not containing a fragment id. If you allow fragment ids >> you're going to get into serious problems with both quoting and >> semantics. [EHL] > I am not sure what to do here. Should the fragment be removed from the definition of 'uri' in the template vocabulary? That seems like the easiest solution (allowing it to be used explicitly with the 'fragment' variable). > > OK this would be a big problem for POWDER where we make specific use of fragment IDs. The basis of POWDER is that you apply descriptors to things defined by string or reg ex matches against a URI (everything on example.com, all its subdomains etc.). But content management systems don't always arrange things nicely so that the pattern matching can work. Our big use case (and WG member) Deutsche Telekom (t-online.de) being a case in point (at least for the time being they use numeric URIs with no discernible pattern). In those situations we need to link from a resource directly to its DR directly which we do using fragment IDs. So you create a POWDER file, complete with attribution and a restriction on its applicability to, say, t-online.de, and then put an xml:id on a actual descriptor set. A resource can then link to that descriptor set with <link rel="describedby" href="/powder.xml#red" type="application/powder+xml" /> (or its HTP equivalent). Note the #red frag. It's not as powerful as the primary POWDER method of resource grouping but it is something we need to support so please, please don't say that a describedby link can't have a fragment ID! Chapter and verse on this is at [1] Phil. [1] http://www.w3.org/2007/powder/Group/powder-dr/20090120-diff.html#directDescript |
|
|
RE: Request for feedback: HTTP-based Resource Descriptor DiscoveryMy understanding of the point Jonathan made is that it was specifically targeting the template vocabulary. For example, consider the following resource URI and template: Resource: http://example.com/resource/1#body Template: {uri};about The question is, does {uri} includes the #body fragment or not. If it does, the template produces: http://example.com/resource/1#body;about which is wrong as it places the suffix in the fragment. My solution in the upcoming draft (-02) is to exclude the fragment and '#' from the {uri} variable. So the above example will produce: http://example.com/resource/1;about and if you want to retain the fragment: {uri};about#{fragment} The other option is to define two sets of {uri} variables, but that seems too messy and is not called for in most use cases. But none of this implies anything with regards to using fragments in links... EHL > -----Original Message----- > From: Phil Archer [mailto:phil@...] > Sent: Wednesday, February 04, 2009 1:42 AM > To: Eran Hammer-Lahav > Cc: Jonathan Rees; www-tag@...; Mark Nottingham; www-talk@... > Subject: Re: Request for feedback: HTTP-based Resource Descriptor > Discovery > > Eran, Jonathan, > > I've been catching up with this thread this morning. The discussion > around redirects shows that it's not a simple matter. In POWDER we > basically chickened out and said that how redirects are handled is > application-specific. We get away with this because what a POWDER DR > describes is defined within the POWDER doc, and who published it is > always explicit. Therefore whether you follow an Link: on a 301 > response > is irrelevant, the data you eventually get, however you get it, is > self-contained. > > However, the particular line that caught my eye in this thread was: > > [..] > > [JR] > >> - I think you need to warn that this protocol should only be applied > >> to URIs not containing a fragment id. If you allow fragment ids > >> you're going to get into serious problems with both quoting and > >> semantics. > [EHL] > > I am not sure what to do here. Should the fragment be removed from > the definition of 'uri' in the template vocabulary? That seems like the > easiest solution (allowing it to be used explicitly with the 'fragment' > variable). > > > > > OK this would be a big problem for POWDER where we make specific use of > fragment IDs. The basis of POWDER is that you apply descriptors to > things defined by string or reg ex matches against a URI (everything on > example.com, all its subdomains etc.). But content management systems > don't always arrange things nicely so that the pattern matching can > work. Our big use case (and WG member) Deutsche Telekom (t-online.de) > being a case in point (at least for the time being they use numeric > URIs > with no discernible pattern). > > In those situations we need to link from a resource directly to its DR > directly which we do using fragment IDs. So you create a POWDER file, > complete with attribution and a restriction on its applicability to, > say, t-online.de, and then put an xml:id on a actual descriptor set. A > resource can then link to that descriptor set with > > <link rel="describedby" href="/powder.xml#red" > type="application/powder+xml" /> > > (or its HTP equivalent). Note the #red frag. It's not as powerful as > the > primary POWDER method of resource grouping but it is something we need > to support so please, please don't say that a describedby link can't > have a fragment ID! > > Chapter and verse on this is at [1] > > Phil. > > [1] > http://www.w3.org/2007/powder/Group/powder-dr/20090120- > diff.html#directDescript |
| Free embeddable forum powered by Nabble | Forum Help |