Hi Ben, Thanks for sharing the opinion. I checked a few predicates and do not see major problems using xpath syntax. We will proceed with the change of using resource ids as keys in the next version.
Thanks! Richard On Jul 26, 2013 3:56 AM, "Ben Niven-Jenkins" <[email protected]> wrote: > Richard, > > On 24 Jul 2013, at 15:20, Y. Richard Yang wrote: > > > Hi all, > > > > My apologies to reopen this thread. > > > > One "concern" of making the IRD data structure a resource ID -> resource > object hash map is whether we can still leverage YANG to express "must" > constraints easily, should we eventually use YANG as a more formal grammar. > > To be blunt, I don't see any value in worrying about whether using the id > as the dictionary key might break something that we might end up doing > eventually. > > Using the id as the key is elegant & it suits our needs today so I say > let's just roll with it. > > Ben > > > My understanding is that YANG uses XPATH for expression of predicates. > Any comment from YANG experts on the mailing list? > > > > Thanks! > > > > Richard > > > > On Friday, July 19, 2013, Y. Richard Yang wrote: > > It appears that we have a consensus on this. Hence, we will update. > > > > Richard > > > > > > On Fri, Jul 19, 2013 at 3:37 AM, Richard Alimi <[email protected]> > wrote: > > Works for me. > > > > > > On Wed, Jul 17, 2013 at 12:37 PM, Y. Richard Yang <[email protected]> > wrote: > > It is very clean indeed. I do not see any problem for now, but will > think about it over night. > > > > Richard > > > > > > On Wed, Jul 17, 2013 at 2:43 PM, Ben Niven-Jenkins < > [email protected]> wrote: > > I like it. Ben > > > > On 17 Jul 2013, at 19:27, Wendy Roome wrote: > > > > > Folks, > > > > > > Since each IRD resource must have a unique ID, why not structure the > > > "resources" field of an IRD as a JSON dictionary, with the ID names as > > > keys? Eg, > > > > > > "resources" : { > > > "default-network-map": { > > > "uri" : "http://alto.example.com/networkmap", > > > "media-type" : "application/alto-networkmap+json" > > > }, > > > "numerical-routing-cost-map": { > > > "uri" : "http://alto.example.com/costmap/num/routingcost", > > > "media-type" : "application/alto-costmap+json", > > > "capabilities" : { > > > "cost-type-names" : [ "num-routing" ] > > > }, > > > "uses": [ "default-network-map" ] > > > }, > > > ...... > > > > > > Yes, that's a change. But that also forces the server to provide unique > > > ids. If not, you get a JSON parse error. > > > > > > > > > That also makes it clear that a server's set of IRDs collectively > define a > > > map from ids to resource descriptors. I suspect that when given an IRD, > > > most clients will build an in-memory map with he ids as keys, and will > > > follow any IRD links until they've added every resource to that table. > > > > > > - Wendy Roome > > > > > > > > > _______________________________________________ > > > alto mailing list > > > [email protected] > > > https://www.ietf.org/mailman/listinfo/alto > > > > _______________________________________________ > > alto mailing list > > [email protected] > > https://www.ietf.org/mailman/listinfo/alto > > > > > > _______________________________________________ > > alto mailing list > > [email protected] > > https://www.ietf.org/mailman/listinfo/alto > > > > > > > >
_______________________________________________ alto mailing list [email protected] https://www.ietf.org/mailman/listinfo/alto
