Richard,

On 9 Jul 2013, at 20:03, "Y. Richard Yang" <[email protected]> wrote:

> 
> On Sun, Jul 7, 2013 at 6:40 AM, Ben Niven-Jenkins <[email protected]> 
> wrote:
>> Rich,
>> 
>> On 4 Jul 2013, at 07:29, Richard Alimi wrote:
>> > On Mon, Jul 1, 2013 at 11:37 PM, Ben Niven-Jenkins 
>> > <[email protected]> wrote:
>> >> On 1 Jul 2013, at 19:34, Y. Richard Yang wrote:
>> >> So it will be an item defined in "meta" of the IRD. Similar to current 
>> >> "cost-types", which defines mapping of names to cost types, this mapping 
>> >> will be from network map name/ID to URI. Is this what you have in mind?
>> >
>> > Basically, yes.
>> >
>> > I was thinking something simpler (without the need for another lookup 
>> > table) - for each resource entry, we just add an 'id' attribute.
> 
> Just to confirm. The ID is for the resource, not the dependent resource.

I don't know what this means. 

> I feel that this is more consistent.
>  
>> I think we're saying the same thing (when I replied to Richard I was working 
>> from memory and forget "meta" applies to the whole IRD), what I'm thinking 
>> is that an existing entry of:
>> 
>> "resources" : [
>>       {
>>         "uri" : "http://alto.example.com/networkmap";,
>>         "media-type" : "application/alto-networkmap+json"
>>       }, {
>>         "uri" : "http://alto.example.com/costmap/num/routingcost";,
>>         "media-type" : "application/alto-costmap+json",
>>         "capabilities" : {
>>           "cost-type-names" : [ "num-routing" ]
>>         }
>>       }]
>> 
>> would become:
>> 
>> "resources" : [
>>       {
>>         "uri" : "http://alto.example.com/networkmap";,
>>         "media-type" : "application/alto-networkmap+json",
>>         "id" : "default-map"
>>       }, {
>>         "uri" : "http://alto.example.com/costmap/num/routingcost";,
>>         "media-type" : "application/alto-costmap+json",
>>         "id" : "default-map",
> 
> If we make the consistent usage that each resource has an id, then the line 
> right above will be:
> 
> "id": "default-costmap"
> 
> 
> Overall, I support that we add an "id" field for each resource entry. I would 
> also like to add a "uses" attribute, just as a software package system will 
> do.

Ah I think I see what you mean. Let's take a step back as we may be heading off 
on a tangent. 

The original problem was how to "link" a cost map to a network map in the 
presence of multiple choices. Therefore the IRD entry for the cost map (and the 
cost map itself) needs to include an identifier for the network map it is 
associated with and the IRD entry for the associated network map (and the 
network map itself) needs to include the same identifier. 

If you want to call the property in the cost map/IRD map something other than 
id to make the different semantics clear (it is identifying the associated 
network map and is not the identifier of the cost map itself) I'm OK with that. 

Introducing an identifier for each resource may make the entries look more 
"consistent" but it's not clear to me how (or whether) they'd be used. If folks 
think it's worthwhile I won't object but keeping things simple helps keep the 
usage clear. 

Ben
> Hence, the preceding example becomes:
> 
> "resources" : [
>       {
>         "uri" : "http://alto.example.com/networkmap";,
>         "media-type" : "application/alto-networkmap+json",
>         "id" : "default-networkmap"
>       }, {
>         "uri" : "http://alto.example.com/costmap/num/routingcost";,
>         "media-type" : "application/alto-costmap+json",
>         "id" : "default-costmap",
>         "uses": ["default-map"]
>         "capabilities" : {
>           "cost-type-names" : [ "num-routing" ]
>         }
>       }]
> 
> For the content of each individual resource, we include both the id and 
> version tag, as Rich's earlier proposal. In other words, now costmap can also 
> have version tags. The use case that I am thinking is that applications can 
> build on top of cost maps, and hence can know if the cost map has changed 
> from the previous version fetched.
> 
> Richard
> 
> 
> 
> 
>  
>>         "capabilities" : {
>>           "cost-type-names" : [ "num-routing" ]
>>         }
>>       }]
>> 
>> Which I think is the same as what you are suggesting.
>> 
>> Ben
> 
_______________________________________________
alto mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/alto

Reply via email to