W3C home > Mailing lists > Public > public-lod@w3.org > November 2010

Hash vs Slash in relation to the 303 vs 200 debate (was: Is 303 really necessary - demo)

From: Ian Davis <lists@iandavis.com>
Date: Sat, 6 Nov 2010 12:33:34 +0000
Message-ID: <AANLkTi=X+0yVwPmKCqHsdZ8Ek_sWmdH8tu2Rw=0ExdoX@mail.gmail.com>
To: nathan@webr3.org
Cc: Antoine Zimmermann <antoine.zimmermann@insa-lyon.fr>, public-lod@w3.org
On Fri, Nov 5, 2010 at 5:28 PM, Nathan <nathan@webr3.org> wrote:
> URI resolution is essentially:
>  dereference( <uri>.toAbsolute() );
> Which gives us the simplicity and semantic indirection which we need. Use
> frags, forget HTTP, know that <uri>#frag is never going to be a document
> (unless you explicitly "say" it is).

On a practical level using frags can be inefficient when your linked
data output is backed by a triple store. If you use a slash URI then
generating the data for html/xml/turtle output is just a simple
"describe <uri>". For hash URIs you need to describe all the resources
with a common prefix because the fragment is not sent by the browser
with the request. That might mean a filter with a regex or string
functions which will be more inefficient. If you pick a standard
fragment such as #this, #it etc then you can revert to the simple
describe so the inefficiency only arises when there are multiple
arbitrary fragments per document URI.

The other downside of fragments is you can't say "it exists but I have
no description of it". With standard slash URIs you can 303 to a 404
to say that. You can 404 on the slash itself to say the resource does
not exist. With my proposal to use 2xx responses you can return 204 No
Content to indicate the resource exists but no description is

With slashes you can use 410 on an individual resource to indicate
that it has gone forever. You can also do this with the one frag per
doc approach although you are really saying the description document
has gone and the user is left to imply the secondary resource has also
gone. With multiple frags per doc (i.e. a lot of schemas) you can't
say just one of those resources has gone forever.

In summary:

Slash with 303: hard static publishing, efficient dynamic, can ack
existence without description

Hash, one resource per doc: easy static publishing, efficient dynamic,
can't ack existence without description

Hash, many resources per doc (the typical schema case): easy static
publishing, less efficient dynamic, can't ack existence without

Slash with 2xx: easy static publishing, efficient dynamic, can ack
existence without description

Received on Saturday, 6 November 2010 12:34:07 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:29:51 UTC