Hi all,
Below is a proposed potential small change (either RFC editor or Errata).
The change is not to address a correctness issue, but does make the
protocol easer to make. Please let us know if you see any problems. The
change is marked with -- new
------
9.2.2. Encoding
An Information Resource Directory response may include in "meta" the
"cost-types" key, whose value is of type IRDMetaCostTypes defined
below, where CostType is defined in Section 10.7,
-- begin new
and CostTypeName is
defined in Section 10.7
-- end new:
object-map {
CostTypeName -> CostType; // -- new change from JSONString to
CostTypeName
} IRDMetaCostTypes;
10.7. Cost Type
The combination of a CostMetric and a CostMode defines a CostType:
object {
CostMetric cost-metric;
CostMode cost-mode;
[JSONString description;]
} CostType;
'description', if present, MUST contain a string with a human-
readable description of the cost-metric and cost-mode. An ALTO
Client MAY present this string to a developer, as part of a discovery
process. But the field is not intended to be interpreted by an ALTO
Client.
-- begin new
A Cost Type can be assigned a name in IRD (see Section 9.2.2). A Cost
Type name is a JSON string with the same format as that of a PIDName
(Section 10.1). The type 'CostTypeName' is used in this document to
indicate a string of this format.
-- end new
On Fri, Mar 21, 2014 at 9:55 AM, Y. Richard Yang <[email protected]> wrote:
> Hi Wendy,
>
> On Thursday, March 20, 2014, Wendy Roome <[email protected]>
> wrote:
>
>> Richard,
>>
>> Yes, those are the names I was referring to.
>>
>> ALTO puts two restrictions on names: length and charset. I believe the
>> length restrictions were added for clients in languages like C with limited
>> support for arbitrary length strings. I gather a server at the first
>> inter-op test used very long tag strings, and one or more clients couldn't
>> handle them.
>>
>
> I remember the same.
>
>>
>> The charset restriction for PID names was to allow a possible hierarchy.
>> The charset restriction for resource ids was because resource-ids can be
>> qualifiers in resource-specific property names -- see {10.8.1}.
>>
>> It would be nice to define a length limit for cost-type names, to
>> simplify clients and for consistency with the other name classes. I don't
>> see any inherent need to restrict their character set. But that said, it
>> would make the IRD a lot more readable if we restrict cost-type-names to
>> the same charset as resource ids.
>>
>
> Agreed.
>
> Good catch indeed.
>
> Richard
>
>>
>> BTW, a JSONString is any quoted string acceptable to JSON, isn't it? If
>> so, it can be any number of unicode characters. So saying that
>> cost-type-names must be JSONStrings does not restrict the names in any way.
>>
>> - Wendy
>>
>> From: "Y. Richard Yang" <[email protected]>
>> Date: Thu, March 20, 2014 at 14:59
>> To: Wendy Roome <[email protected]>
>> Cc: IETF ALTO <[email protected]>
>> Subject: Re: [alto] Format of ALTO cost-types?
>>
>> Hi Wendy,
>>
>> To clarify, you mean the assigned name in IRD. For example, in the
>> example below, it is "num-routing", "num-hop", right?
>>
>> HTTP/1.1 200 OK
>> Content-Length: 2333
>> Content-Type: application/alto-directory+json
>>
>> {
>> "meta" : {
>> "cost-types": {
>> "num-routing": {
>> "cost-mode" : "numerical",
>> "cost-metric": "routingcost",
>> "description": "My default"
>> },
>> "num-hop": {
>> "cost-mode" : "numerical",
>> "cost-metric": "hopcount"
>> },
>> "ord-routing": {
>> "cost-mode" : "ordinal",
>> "cost-metric": "routingcost"
>> },
>> "ord-hop": {
>> "cost-mode" : "ordinal",
>> "cost-metric": "hopcount"
>> }
>> },
>>
>> The related definition then is
>>
>> object-map {
>> JSONString -> CostType;
>> } IRDMetaCostTypes;
>>
>> object {
>> JSONString cost-type-names<1..1>;
>> } CostMapCapabilities;
>>
>> The proposal is to limit JSONString? I agree that this is more consistent
>> with PIDName, Resource ID, ... We restricted PIDName and Resource ID with
>> an intention of introducing hierarchy in the future (e.g., this is why '.'
>> is not allowed ...) Is this necessary for CostType names?
>>
>> Thanks!
>>
>> Richard
>>
>
>
> --
> --
> =====================================
> | Y. Richard Yang <[email protected]> |
> | Professor of Computer Science |
> | http://www.cs.yale.edu/~yry/ |
> =====================================
>
>
--
--
=====================================
| Y. Richard Yang <[email protected]> |
| Professor of Computer Science |
| http://www.cs.yale.edu/~yry/ |
=====================================
_______________________________________________
alto mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/alto