StatusDataset » History » Revision 7
Revision 6 (Davide Pesavento, 06/28/2020 02:15 PM) → Revision 7/8 (Davide Pesavento, 10/30/2021 08:10 PM)
# Status Dataset **Status Dataset** is a mechanism of [[Management|NFD Management protocol]]. This document defines how status information about a collection of entities is encoded, segmented, and published as Data packets. **Status Dataset** is used by: * [[FaceMgmt|FaceManager]]: to publish the description of all active faces and their counters * [[FibMgmt|FibManager]]: to publish all FIB entries and nexthop records * [[StrategyChoice|StrategyChoiceManager]]: to publish strategy choices for namespaces * [[RibMgmt|RibManager]]: to publish all RIB entries and routes ## Specification **Encoding** Status information of each entity is represented by a TLV block. Those TLV blocks are concatenated into a BLOB. **Segmentation** The BLOB is segmented into one or more Data packets, such that each Data packet does not exceed the size limit. Segmentation does not consider the boundary between TLV blocks. **Data Naming** A status dataset is publish under a certain Name prefix. Every Data packet has Name `/<prefix>/<version>/<segment>`. `ndn:/<prefix>/<version>/<segment>`. The *version* component is a `NameComponentWithMarkerAndNumber`, as in [NDN Naming Conventions (rev 1)](http://named-data.net/doc/tech-memos/naming-conventions.pdf). This component starts with a `0xFD` marker, followed by a `NonNegativeInteger`. The version number is monotonic increasing during the lifetime of the producer; it could be but is not necessarily a timestamp. The *segment* component is a `NameComponentWithMarkerAndNumber`, as in [NDN Naming Conventions (rev 1)](http://named-data.net/doc/tech-memos/naming-conventions.pdf). This component starts with a `0x00` marker, followed by a `NonNegativeInteger`. The first segment has segment number zero. An example Name is: `/example/dataset/%FD%00%00%01G%BB%82%CB%A8/%00%01`. `ndn:/example/dataset/%FD%00%00%01G%BB%82%CB%A8/%00%01`. This represents the second segment (segment number 1) in version 1407600217000 of a dataset at `/example/dataset`. `ndn:/example/dataset`. *FinalBlockId* field contains the *segment* component of the last segment. This field MUST appear in the last segment, and MAY appear in other segments. ## Operations To request a status dataset, the consumer should: consumer: 1. send an Interest `/example/dataset`, CanBePrefix=yes, `ndn:/example/dataset`, ChildSelector=rightmost, MustBeFresh=yes * if the consumer has a previous version of this dataset and wish to request a new version, set Exclude=Any..*last-known-version* 2. wait for a Data; if no Data arrives, fail 3. take note of *version* in the arriving Data Name 4. send Interest(s) `/example/dataset/<version>/<segment>` ndn:/example/dataset/*version*/*segment* to retrieve other segments 5. repeat step 4 until all segments are retrieved 6. sort segments in order, concatenate the Content of all segments to obtain the BLOB 7. parse the BLOB into a series of TLV blocks each represents the status information of an entity To publish a status dataset, the producer should: producer: 1. listen on prefix `/example/dataset` `ndn:/example/dataset` 2. upon receiving an Interest, if the Interest Name is longer than `/example/dataset` `ndn:/example/dataset` (it contains version and/or segment), don't respond and abort these steps * these Interests should be satisfied by the ContentStore 3. generate a new version number 4. collect status TLV blocks, concatenate into the BLOB, and segment it into Data packets 5. put all Data packets * the first Data packet (preferably the first segment) satisfies the Interest * other Data packets are admitted to the ContentStore as unsolicited Data