StatusDataset » History » Version 4
Davide Pesavento, 06/07/2017 02:08 PM
1 | 1 | Junxiao Shi | # Status Dataset |
---|---|---|---|
2 | |||
3 | |||
4 | **Status Dataset** is a mechanism of [[Management|NFD Management protocol]]. |
||
5 | This document defines how status information about a collection of entities is encoded, segmented, and published as Data packets. |
||
6 | |||
7 | **Status Dataset** is used by: |
||
8 | |||
9 | * [[FaceMgmt|FaceManager]]: to publish the description of all active faces and their counters |
||
10 | 4 | Davide Pesavento | * [[FibMgmt|FibManager]]: to publish all FIB entries and nexthop records |
11 | * [[StrategyChoice|StrategyChoiceManager]]: to publish strategy choices for namespaces |
||
12 | * [[RibMgmt|RibManager]]: to publish all RIB entries and routes |
||
13 | 1 | Junxiao Shi | |
14 | ## Specification |
||
15 | |||
16 | **Encoding** |
||
17 | |||
18 | Status information of each entity is represented by a TLV block. |
||
19 | Those TLV blocks are concatenated into a BLOB. |
||
20 | |||
21 | **Segmentation** |
||
22 | |||
23 | The BLOB is segmented into one or more Data packets, such that each Data packet does not exceed the size limit. |
||
24 | Segmentation does not consider the boundary between TLV blocks. |
||
25 | |||
26 | **Data Naming** |
||
27 | |||
28 | A status dataset is publish under a certain Name prefix. |
||
29 | Every Data packet has Name ndn:/*prefix*/*version*/*segment* |
||
30 | |||
31 | 3 | Junxiao Shi | The *version* component is a NameComponentWithMarkerAndNumber, as in [NDN Naming Conventions](http://named-data.net/doc/tech-memos/naming-conventions.pdf). |
32 | This component starts with a 0xFD marker, followed by a nonNegativeInteger. |
||
33 | 1 | Junxiao Shi | The version number is monotonic increasing during the lifetime of the producer; |
34 | it could be but is not necessarily a timestamp. |
||
35 | |||
36 | 3 | Junxiao Shi | The *segment* component is a NameComponentWithMarkerAndNumber, as in [NDN Naming Conventions](http://named-data.net/doc/tech-memos/naming-conventions.pdf). |
37 | This component starts with a 0x00 marker, followed by a nonNegativeInteger. |
||
38 | 1 | Junxiao Shi | The first segment has segment number zero. |
39 | |||
40 | 3 | Junxiao Shi | An example Name is: `ndn:/example/dataset/%FD%00%00%01G%BB%82%CB%A8/%00%01`. |
41 | This represents the second segment (segment number 1) in version 1407600217000 of a dataset at `ndn:/example/dataset`. |
||
42 | |||
43 | 1 | Junxiao Shi | *FinalBlockId* field contains the *segment* component of the last segment. |
44 | This field MUST appear in the last segment, and MAY appear in other segments. |
||
45 | |||
46 | ## Operations |
||
47 | |||
48 | To request a status dataset, the consumer: |
||
49 | 2 | Alex Afanasyev | |
50 | 3 | Junxiao Shi | 1. send an Interest `ndn:/example/dataset`, ChildSelector=rightmost, MustBeFresh=yes |
51 | 1 | Junxiao Shi | * if the consumer has a previous version of this dataset and wish to request a new version, |
52 | set Exclude=Any..*last-known-version* |
||
53 | 2. wait for a Data; if no Data arrives, fail |
||
54 | 3. take note of *version* in the arriving Data Name |
||
55 | 3 | Junxiao Shi | 4. send Interest(s) ndn:/example/dataset/*version*/*segment* to retrieve other segments |
56 | 1 | Junxiao Shi | 5. repeat step 4 until all segments are retrieved |
57 | 6. sort segments in order, concatenate the Content of all segments to obtain the BLOB |
||
58 | 7. parse the BLOB into a series of TLV blocks each represents the status information of an entity |
||
59 | |||
60 | To publish a status dataset, the producer: |
||
61 | |||
62 | 1. listen on prefix `ndn:/example/dataset` |
||
63 | 2. upon receiving an Interest, if the Interest Name is longer than `ndn:/example/dataset` (it contains version and/or segment), don't respond and abort these steps |
||
64 | * these Interests should be satisfied by the ContentStore |
||
65 | 3. generate a new version number |
||
66 | 4. collect status TLV blocks, concatenate into the BLOB, and segment it into Data packets |
||
67 | 5. put all Data packets |
||
68 | * the first Data packet (preferably the first segment) satisfies the Interest |
||
69 | * other Data packets are admitted to the ContentStore as unsolicited Data |