Subject: Re: [alto] IRD declaration

From: Wendy Roome <[email-masked]>
Date: Fri, 10 May 2013 10:31:54 -0400

Here's my suggestion: In the first IRD, just say that "maps" returns the
media-type for an IRD:

	{
		"uri" : "http://custom.alto.example.com/maps",
		"media-types" : ["application/alto-directory+json"],
	},

If a client wants to find out what services are available via that server,

GET the IRD.

I believe that means that there's no longer any need for "container"
entries;
everything is a leaf, and "accepts" and "media-types" can be single strings
rather than arrays.

	- Wendy Roome

>Date: Tue, 7 May 2013 16:18:59 -0400
>From: "Y. Richard Yang" <[email-masked]>
>Subject: [alto] IRD declaration
>
>Dear all,
>
>As we work to finalize a newer version to get feedback, here is a quick
>question that we need feedback/comments to have a quick closure. The issue
>can be discussed using the current posted version (
>http://datatracker.ietf.org/doc/draft-ietf-alto-protocol/?include_text=1),
>although we will post a newer version soon.
>
>Specifically, consider the first IRD example in Sec. 7.6.3. One can
>identify that among the six entries, 5 are base or "leaf" entries, which
>represent specific Information Resources, and one is a "container" entry:
>
>{
>         "uri" : "http://custom.alto.example.com/maps",
>         "media-types" : [
>           "application/alto-networkmap+json",
>           "application/alto-costmap+json"
>         ],
>         "accepts" : [
>           "application/alto-networkmapfilter+json",
>           "application/alto-costmapfilter+json"
>         ]
>       },
>
>In other words, one can envision that IRD can be a hierarchy for
>flexibility and delegation.
>
>A question is whether we explicitly distinguish such two types of
>entries in syntax -- they are different in semantics already.
>
>Note that distinguishing the two types by simply checking the number
>of entries in media-types or accepts will be less robust.
>
>One possibility is the following. A "leaf" IRD entry has the format:
>"uri": ""
>"media-type": ""
>"accept": ""
>"capabilities" : {}
>
>A "container" IRD has the format:
>  "uri" :
>  "media-types" : []
>  "accepts" : []
>  // no capabilities
>
>Any thought?
>
>Richard
>

---

From: Wendy Roome <[email-masked]>
Date: Fri, 10 May 2013 11:15:32 -0400

If an ALTO server provides several different services via the same URI,
and distinguishes them via the type of POST data that the client sends,
why not just declare them with several different IRD entries? The uri
isn't a key; nothing says several entries can't have the same uri.

Eg, if "multi-service" provides both endpoint property and cost services,
use:

   }, {
        "uri": "http://myaltoserver.com/multi-service",
        "media?types" : [ "application/alto?endpointprop+json" ],
        "accepts" : [ "application/alto?endpointpropparams+json" ],
        "capabilities" : { "prop?types" : [ "pid" ] }
   }, {
        "uri" : "http://myaltoserver.com/multi-service",
        "media?types" : [ "application/alto?endpointcost+json" ],
        "accepts" : [ "application/alto?endpointcostparams+json" ],
        "capabilities" : {
            "cost?constraints" : true,
            "cost?type?names" : [
"num?routing","num?hop","ord?routing","ord?hop"]
        }
   }

(Sorry if my comments are out-of-order; my sinuses been "out-of-order" for
a few days, and I'm just catching up.)

        - Wendy Roome

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

>Message: 2
>Date: Wed, 8 May 2013 14:34:27 -0400
>To: Enrico Marocco <[email-masked]>
>Cc: IETF ALTO <[email-masked]>
>Subject: Re: [alto] IRD declaration
>Message-ID:
>	<[email-masked]>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Enrico,
>
>On May 8, 2013 4:17 AM, "Enrico Marocco" <[email-masked]>
>wrote:
>>
>>Hi Richard,
>>
>>since the new version has been submitted, the actual section with the
>>example you mention is 8.5.3
>>(http://tools.ietf.org/html/draft-ietf-alto-protocol-15#section-8.5.3).
>
>Yes.
>
>>On the substance of the question, I believe it's essential to have the
>>syntax flexible enough to reflect proper semantics. However -- forgive
>>the JavaScript speak --  with the current specification the distinction
>>between "leaf" and "container" would basically require a check on
>>(media-types.length == 1), while with the proposed change it would turn
>>out to (typeof media-types == "string"), correct?
>
>It can be more complex. For example,  the just submitted version allows
>IRD
>to announce multipe cost types of an unfiltered cost map with a single
>media type. Hence we have a case that media-types has a length of 1 but we
>do not have a leaf node.
>
>As another example. Consider a possible future extension, where we may
>consider allowing two media types for one IR: for example,  both the
>current cost map format or a new matrix format. Hence, IRD could announce
>two media types for it, and ALTO Clients can indicate one using http
>Accept
>in request. Hence, we have a case of media-types with length > 1, but we
>have a leaf.
>