Project

General

Profile

Notification » History » Revision 11

Revision 10 (Davide Pesavento, 06/03/2020 04:55 PM) → Revision 11/12 (Davide Pesavento, 06/28/2020 02:15 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 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`, NameComponentWithMarkerAndNumber, as defined in [NDN Naming Conventions (rev 1)](http://named-data.net/doc/tech-memos/naming-conventions.pdf). 
     This component starts with a `0xFE` marker, followed by a `NonNegativeInteger`. 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 1 ms) to facilitate subscriber operations. 
 The management dispatcher keeps them in an in-memory cache, 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 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. 
 If any Interest times out (because no notification is delivered within InterestLifetime), the subscriber should restart with the initial request.