Project

General

Profile

Notification » History » Revision 9

Revision 8 (Junxiao Shi, 10/29/2018 02:17 AM) → Revision 9/12 (Davide Pesavento, 10/29/2018 06:23 PM)

 
 # Notification Stream 

 **Notification Stream** is a mechanism of [[Management|NFD Management protocol]]. 
 It is a way to get updates about events happening in the forwarder. 
 This mechanism is useful for monitoring the forwarder's forwarder state. 

 ## Naming 

 * A stream of notifications is published under a certain Name prefix. 
 * A notification is a Data packet under this Name prefix with a sequence number. 
   * The sequence number component is a NameComponentWithMarkerAndNumber, as in [NDN Naming Conventions](http://named-data.net/doc/tech-memos/naming-conventions.pdf). 
     This component starts with a 0xFE marker, followed by a nonNegativeInteger. 
   * The sequence numbers of notifications in the same stream should be consecutive and increasing. 
   * Each notification is limited to one Data packet. 

 Example: 

     ndn:/localhost/nfd/faces/events/%FE%00 // first notification 
     ndn:/localhost/nfd/faces/events/%FE%01 // second notification 

 ## Notification publisher 

 Notifications from NFD are Data packets generated and signed by NFD. 
 FreshnessPeriod should be set to a minimum value (typically 1ms) to facilitate subscriber operations. 
 The management dispatcher keeps them in an in-memory cache, storage, ready for retrieval by subscribers. 

 ## Notification subscriber 

 The subscriber should initially request the Name of the notification stream with CanBePrefix and MustBeFresh elements. 
 After a notification is received, the subscriber subscribe can send an Interest for the next anticipated sequence number, without CanBePrefix and MustBeFresh elements. 
 In both cases, InterestLifetime should be set to a long duration, e.g., 1 minute. such as 60000ms. 
 If any Interest times out (because no notification is delivered within InterestLifetime), the subscriber should restart restarts with the initial request.