Subject: Re: [alto] Should we allow relative URIs in resource directories?

From: Wendy Roome <[email-masked]>
Date: Wed, 13 Feb 2013 09:38:52 -0500

RFC 3986 does define relative URIs, so technically that's sufficient. But
I think that's like a lawyer burying some critical information -- like
"double every amount that you owe us" -- in tiny type in a footnote.
Legal, but sleazy.

The problem is that software libraries with a simple connectToServer(uri)
function require an absolute uri. If the uri might be relative, the client
must first resolve the uri in the context of some absolute base uri. Most
libraries provide a function to do that, but it's easy to forget that step.

Case in point: My client, which passed all the interop tests, failed when
it contacted a server that returned relative URIs. (And yes, I've since
fixed my client.)

So if we want to allow relative URIs, we should be more explicit. At the
very least, add this sentence to the end of Ben's revised uri section:

    Relative URIs should be resolved using the URI of the Information
Resource Directory as the base URI.

Even better, use some relative URIs in the example.

On the other hand, if we want to forbid relative uris, we should instead
add:

    The URI must be absolute, not relative.

	- Wendy

>Date: Tue, 12 Feb 2013 14:33:10 +0000
>From: Ben Niven-Jenkins <[email-masked]>
>Subject: Re: [alto] Should we allow relative URIs in resource
>	directories?
>Message-ID: <[email-masked]>
>
>Wendy,
>
>I see no reason to restrict to absolute URIs.
>
>Currently section 6.7.2 of the ALTO protocol spec states:
>
>   uri  A URI at which the ALTO Server provides one or more Information
>      Resources, or an Information Resource Directory indicating
>      additional Information Resources.
>
>Would adding a reference to section 4.1 of RFC3986 be sufficient, e.g.
>
>   uri  A URI reference (as per section 4.1 of [RFC3986] to one or more
>      Information Resources, or an Information Resource Directory
>      indicating additional Information Resources.
>
>
>Ben

---

From: Wendy Roome <[email-masked]>
Date: Wed, 13 Feb 2013 09:52:05 -0500

Here's my take on the tradeoffs.

Relative URIs simplify the ALTO server. Assuming the server is built on
top of an http handling package, like servlets, the server name and port
number are configured at the http handler level. The ALTO-specific server
code doesn't see, or otherwise need, that information. The server can
extract the server & port from the http handler, but it takes some effort.

On the other hand, relative URIs complicate clients, because the client
must resolve the relative URI in the context of the resource directory
URI. That isn't hard (most http client libraries have a resolve function),
but it is easy to forget. The client will work fine with ALTO servers that
return absolute URIs, but will fail the first time it connects to a server
that uses relative URIs.

It's another example of the Law of Conservation Of Difficulty. :-)

   - Wendy Roome

On 02/12/2013 15:00, "[email-masked]" <[email-masked]> wrote:

>Date: Tue, 12 Feb 2013 15:44:48 +0000
>From: "Diego R. Lopez" <[email-masked]>
>Hi,
>I think allowing only absolute URIs would translate into simpler
>mechanisms to build them, and better understanding by human readers
>trying to debug based on ALTO outputs, but I acknowledge these are
>limited advantages if there are any other reasons for allowing relative
>URIs.

---

From: Ben Niven-Jenkins <[email-masked]>
Date: Thu, 14 Feb 2013 06:56:26 +0000

Wendy,

> Resource Directory as the base URI.

Or a reference to section 5 of RFC 3986 rather than re-specifying its semantics.

Maybe something like:
   URIs can be relative and MUST be resolved according to section 5 of 
   [RFC3986].

Ben

---

From: Richard Alimi <[email-masked]>
Date: Thu, 14 Feb 2013 22:06:48 -0800

On Wed, Feb 13, 2013 at 10:56 PM, Ben Niven-Jenkins <[email-masked]
> wrote:

>    URIs can be relative and MUST be resolved according to section 5 of

+1 for allowing relative URIs.  If there are no dissenting opinions, we'll
update the draft with Ben's proposed text.

>
> Ben
>
>
> _______________________________________________
> alto mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/alto
>

---

From: Wendy Roome <[email-masked]>
Date: Fri, 15 Feb 2013 09:18:41 -0500

To  reinforce that, how about using relative URIs in the 6.7.3 example?  Eg,
replace
        "uri" : "http://alto.example.com/networkmap",
with
        "uri" : "/networkmap",
etc.

- Wendy

From:  Richard Alimi <[email-masked]>
Date:  Fri, February 15, 2013 01:06
To:  Ben Niven-Jenkins <[email-masked]>
Cc:  Bill Roome <[email-masked]>, "[email-masked]"
<[email-masked]>
Subject:  Re: [alto] Should we allow relative URIs in resource directories?

---

From: "Vijay K. Gurbani" <[email-masked]>
Date: Fri, 15 Feb 2013 08:52:04 -0600

[As individual contributor]

On 02/15/2013 12:06 AM, Richard Alimi wrote:
> +1 for allowing relative URIs.  If there are no dissenting opinions,
> we'll update the draft with Ben's proposed text.

Richard: That is fine.  Originally I was going to state that we adopt
absolute URIs, but I must admit that this was driven by expediency
of us adopting *a* position instead of greeting the issue with silence
on the list.

Wendy has outlined the pros and cons of absolute versus relative URIs,
and yes it is a bit of pain to handle relative URIs,  But as long as we
have a position well spelled out in the document, adhering to it is a
matter of minor implementation complexity.  Let's go for what you
suggest above.

Thanks,

- vijay
-- 
Vijay K. Gurbani, Bell Laboratories, Alcatel-Lucent
1960 Lucent Lane, Rm. 9C-533, Naperville, Illinois 60563 (USA)
Email: vkg@{bell-labs.com,acm.org} / [email-masked]
Web:   http://ect.bell-labs.com/who/vkg/