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 protected]" <[email protected]> wrote:

>Message: 2
>Date: Wed, 8 May 2013 14:34:27 -0400
>From: "Y. Richard Yang" <[email protected]>
>To: Enrico Marocco <[email protected]>
>Cc: IETF ALTO <[email protected]>
>Subject: Re: [alto] IRD declaration
>Message-ID:
>       <canuuolq6fbrbwqjtz2j2gaurwnauo2ggrpbwi5pm62tcibu...@mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Enrico,
>
>On May 8, 2013 4:17 AM, "Enrico Marocco" <[email protected]>
>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.
>


_______________________________________________
alto mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/alto

Reply via email to