I'll like to restart the discussion about YANG hash clashes based on the
following comment made by Andy during the 6TiSH call.
Extract from 6TiSCH minute "Andy: in RestCONF, if there are siblings in the
tree with the same local name, the server needs to qualify which module is each
query coming from. If there is a collision you need the full extended name
instead of the local name."
If we take the following YANG modules as examples, can we use one of the
propose options as the basic for a consensus?
"ModuleA"
+- "DataNodeA" (hash = 228432313 or "NnZm5")
|
+- "DataNodeB" (hash = 382808449 or "W0TGB", Clash with "DataNodeN")
|
+- "DataNodeC" (hash = 122044769 or "HRkFh")
|
+- "DataNodeD" (hash = 844610356 or "yV7s0")
|
+- "DataNodeE" (hash = 268840462 or "QBi4O", Clash with "DataNodeY")
"ModuleB"
+- "DataNodeM" (hash = 161068239 or "JmbTP")
|
+- "DataNodeN" (hash = 382808449 or "W0TGB", Clash with "DataNodeB")
|
+- "DataNodeO" (hash = 583043744 or "iwIqg")
|
+- "DataNodeP" (hash = 476166369 or "cYbjh")
"ModuleC"
+- "DataNodeX" (hash = 938674383 or "38wjP")
|
+- "DataNodeY" (hash = 268840462 or "QBi4O", Clash with "DataNodeD")
|
+- "DataNodeZ" (hash = 727582530 or "rXgdC")
To access data node(s) without clashes (e.g. "DataNodeA"), the exchange may
look as follow:
REQ: GET /mg?select("NnZm5")
OPTION #1, fully extended data node(s) returned only for root data nodes with
clashes
Option #2, fully extended data node(s) returned for all root data nodes
Option #3, fully extended data node(s) returned for all data nodes with clashes
RES: 2.05 Content (Content-Format: application/cbor)
{
228432313 : {
382808449 : "B",
122044769 : "C",
844610356 : {
268840462 : "E"
}
}
}
RES: 2.05 Content (Content-Format: application/cbor)
{
"ModuleA.NnZm5" : {
382808449 : "B",
122044769 : "C",
844610356 : {
268840462 : 789
}
}
}
RES: 2.05 Content (Content-Format: application/cbor)
{
228432313 : {
"ModuleA.W0TGB" : "B",
122044769 : "C",
844610356 : {
"ModuleA.QBi4O" : "E"
}
}
}
To access data node(s) with clashes (e.g. "DataNodeB", "DataNodeD",
"DataNodeN", "DataNodeY"), the exchange may look as follow:
REQ: GET /mg?select("W0TGB,yV7s0,W0TGB,QBi4O")
RES: 4.1x ClashError (Content-Format: application/cbor)
["W0TGB", "QBi4O"]
REQ: GET /mg?select("ModuleA.W0TGB,yV7s0,ModuleB.W0TGB,ModuleC.QBi4O")
OPTION #1, fully extended data node(s) returned only for root data nodes with
clashes
Option #2, fully extended data node(s) returned for all root data nodes
Option #3, fully extended data node(s) returned for all data nodes with clashes
RES: 2.05 Content (Content-Format: application/cbor)
{
"ModuleA.W0TGB": 123,
844610356 : {
844610356 : 789
},
"ModuleB.W0TGB" : "abc",
"ModuleC.QBi4O" : {
727582530 : "ABC"
}
}
RES: 2.05 Content (Content-Format: application/cbor)
{
"ModuleA.W0TGB" : 123,
"ModuleA.yV7s0" : {
844610356 : 789
},
"ModuleB.W0TGB" : "abc",
"ModuleC.QBi4O" : {
727582530 : "ABC"
}
}
RES: 2.05 Content (Content-Format: application/cbor)
{
"ModuleA.W0TGB" : 123,
844610356 : {
"ModuleA.QBi4O" : 789
},
"ModuleB.W0TGB" : "abc",
"ModuleC.QBi4O" : "def"
}
To access the entire datastore, the exchange may look as follow:
REQ: GET /mg
OPTION #1, fully extended data node(s) returned only for root data nodes with
clashes
Option #2, fully extended data node(s) returned for all root data nodes
Option #3, fully extended data node(s) returned for all data nodes with clashes.
Note: All root data nodes must be fully extended so CoMI clients can
unambiguously identify the returned data.
Don't seem to be practical, the CoMI client won't be able to identify
unambiguously the returned data nodes
RES: 2.05 Content (Content-Format: application/cbor)
{
"ModuleA.NnZm5" : {
382808449 : "B",
122044769 : "C",
844610356 : {
268840462 : "E"
}
},
"ModuleB.JmbTP" : {
382808449 : "N",
583043744 : "O",
583043744 : "P"
},
"ModuleC.38wjP" : {
268840462: {
727582530 : "Z"
}
}
}
RES: 2.05 Content (Content-Format: application/cbor)
{
"ModuleA.NnZm5" : {
382808449 : "B",
122044769 : "C",
844610356 : {
268840462 : "E"
}
},
"ModuleB.JmbTP" : {
"ModuleB.W0TGB" : "N",
583043744 : "O",
583043744 : "P"
},
"ModuleC.38wjP" : {
"ModuleC.QBi4O": {
727582530 : "Z"
}
}
}
[cid:[email protected]]
Michel Veillette
System Architecture Director
Trilliant Inc.
Tel: 450-375-0556 ext. 237
[email protected]<mailto:[email protected]>
www.trilliantinc.com<http://www.trilliantinc.com/>
_______________________________________________
6tisch mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/6tisch