13
Introducing CoMI •Aligned with RestCONF (draft-ietf-netconf- restconf-04) •Common data modeling language (YANG defined in RFC 6020) •Protocol (CoAP instead of http) •Security (DTLS instead of TLS) •Payload encoded (CBOR instead of XML or JSON) •Data node identifier (30 bit hash value instead of data node path) Hash values are encoded in base64 in URI, in binary in payload

Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Embed Size (px)

Citation preview

Page 1: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Introducing CoMI

• Aligned with RestCONF (draft-ietf-netconf-restconf-04)• Common data modeling language (YANG defined in RFC 6020)• Protocol (CoAP instead of http)• Security (DTLS instead of TLS)• Payload encoded (CBOR instead of XML or JSON)• Data node identifier (30 bit hash value instead of data node path)

Hash values are encoded in base64 in URI, in binary in payload

Page 2: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

ExampleRestCONF (214 bytes payload)

GET /restconf/data/ietf-6tisch-mac:TSCHSpecificPIBAttributesHost: example.comAccept: application/yang.data+json

HTTP/1.1 200 OKDate: Mon, 23 Apr 2012 17:01:30 GMTServer: example-serverContent-Type: application/yang.data+json{ "ietf-6tisch:TSCHSpecificPIBAttributes" : { "macMinBE" : 3, "macMinBE" : 7, "macDisconnectTime" : 255, "macJoinPriority" : 1, "macASN" : 164926744166, "macNoHLBuffers" : true }}

CoMI (52 bytes payload)

REQ: GET example.com/mg/nDAal

RES: 2.05 Content (Content-Format: application/cbor)a1 1a 270c06a5 a6 1a 18f1deec 03 1a 3a4367ae 07 1a 0fd897c1 18 ff 1a 0f817d75 01 1a 35920a57 1b 0000002666666666 1a 2386c778 f5

Page 3: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

YANG hash clashes

• Hashes are computed using the murmur3 hash on the canonical representation of the data node path.For example:mmh3 ('/6top:TSCHSpecificPIBAttributes/6top:macMinBE', 42) = 418504428 or "Y8d7s" in base64

• Hashes may be identical for different names, so-called clashes• Hash clashes within a module can be detected and fixed at module

design time• Hash clashes between modules depend on the set of modules

implemented by each CoMI server

Page 4: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

YANG hash clashes

Set of YANG hashesfor Module A Set of YANG hashes

for Module B

Set of YANG hashesfor Module C

Hash clashes

Page 5: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Hash clashes handling as defined indraft-vanderstok-core-comi-06• CoMI servers with hash clashes need to implement a “rehash” list

containing:• The hash causing the clash• The data node path• A character appended to the path to resolve the clash

• CoMI clients need to retrieve the “rehash” list of each CoMI server prior to accessing them• CoMI clients use the “rehash” list as a lookup table to associate the

right data node with the right hash• CoMI clients need to store the full data node names

Page 6: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Hash clashes handling as defined indraft-vanderstok-core-comi-06

Data nodes- 655099557, value- 418504428, value (Rehash to 515761480)- …“rehash” list- 418504428, “/6top:TSCHSpecificPIBAttributes/6top:macMinBE”, “_”

CoMI server #1

Data nodes- 655099557, value- 418504428, value- …“rehash” list- <empty>

CoMI server #n

- Path of each data node for lookup in “rehash” lists

- Server 1 “rehash” list- Server n “rehash” list

CoMI client

Step 1Retrieve “rehash” list from server#1 to #n

Step 2For each access to data node, perform a lookup in “rehash” list to associate the right data node with the right hash

Step 1

Step 2

Page 7: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

First alternate solution (simplified “rehash” list)• Assuming that hash clashes within each module are resolved at

design time• CoMI servers return a “hash clash” error only when a CoMI client tries

to access data node(s) with hash clashes• The CoMI client generates a simplified “rehash” list containing:• The old hash• The new hash• The module identifier (local to client)

• The CoMI client uses the “rehash” list to resend the request with the proper hash

Page 8: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

First alternate solution (simplified “rehash” list)

Data nodes- 655099557, value- 418504428, empty (Rehashed to 515761480)- …“extend” list- 515761480 , value

CoMI server #1

Data nodes- 655099557, value- 418504428, value- …“rehash” list- <empty>

CoMI server #n

- Module name & data nodes hashes

- Server 1 “rehash” list- Server n “rehash” list

CoMI client

Step 1Try to access a data node

Step 2If “hash clash” error receive, retrieve “rehash” from “clash_file”using module name, old hash”

Step 3Try again to access a data nodewith the rehash value

[ Step 2 ]

Step 1[ Step 3 ]

Page 9: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Second alternate solution (No “rehash” list)• Assuming that hash clashes within each module is resolved at design time• CoMI servers return a “hash clash” error only when a CoMI client tries to access

data node(s) with hash clashes• On reception of a “hash clash” error, a CoMI client resends its request with the

optional query parameter specifying the module name.

Notes:• This format can also be used all the time to avoid “hash clash” errors.• “rehash” list are not required (to implement, to retrieve, to lookup)• But requires communication overhead, and module name in server

For example:GET example.com/Y8d7s?select= ietf-6tisch-mac

Permanent query overhead

Page 10: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Second alternate solution (No “rehash” list)

Data nodes- 655099557, ietf-6tisch-mac, value- 418504428, ietf-6tisch-mac, value - …

CoMI server #1

Data nodes- 655099557, ietf-6tisch-mac, value- 418504428, ietf-6tisch-mac, value- …

CoMI server #n

- Module name & data nodes hashes

CoMI client

Step 1Try to access a data node

Step 2If “hash clash” error receive, try again to access the data node with the module name added as optional query parameter.

e.g. GET example.com/Y8d7s?select= ietf-6tisch-mac

Step 1

[ Step 2 ]

Page 11: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Third alternate solution (Managed IDs)

• Partially managed identifiers (Module ID) or fully managed identifiers (Module ID & Data node ID)• Require IANA registration of

each YANG module writer. Each writer need to assign module IDs and optionally data node IDs.• Allows payload size reduction

For example (24 bytes payload):

REQ: GET example.com/mg/1&select(5)

RES: 2.05 Content (Content-Format: application/cbor)a1 01 a6 02 03 03 07 04 18 ff 05 01 06 1b 0000002666666666 07 f5

Page 12: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Third alternate solution (Managed IDs)

Data nodes- data node #1, module #5, value- data node #2, module #5, value - …

CoMI server #1

Data nodes- data node #1, module #5, value- data node #2, module #5, value - …

CoMI server #n

- Module ID & data nodes ID

CoMI client

Step 1Access a data nodee.g. GET example.com/mg/1&select(5)

Step 1

Page 13: Introducing CoMI Aligned with RestCONF (draft-ietf-netconf-restconf-04) Common data modeling language (YANG defined in RFC 6020) Protocol (CoAP instead

Other items to be discussed within CoMI• Support of the YANG RPC

Similar approach as the RestCONF RPC (protocol operations)• Support of the YANG notification

Similar approach as the RestCONF notification