Project

General

Profile

Notification » History » Revision 8

Revision 7 (Junxiao Shi, 08/09/2014 09:18 AM) → Revision 8/12 (Junxiao Shi, 10/29/2018 02:17 AM)

 
 # 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 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. 

 These Data packets enter forwarding system via the InternalFace, and are subject to regular forwarding pipelines. 
 FreshnessPeriod They should be admitted into the ContentStore. 

 ## Notification subscriber 

 The subscriber should typically request the Name of notification stream (`ndn:/localhost/nfd/faces/events` in the example) with ChildSelector=rightmost and Exclude=Any..*last-received-seq*. 
 If the subscriber has no knowledge of *last-received-seq*, the Exclude selector should be omitted. 
 InterestLifetime should be set to a minimum value (typically 1ms) to facilitate subscriber operations. long duration, such as 60000ms. 

 * If no new notification has been generated after *last-received-seq*, this Interest will stay in the PIT, and be satisfied when a new notification is generated. 
 * If one or more new notifications have been generated after *last-received-seq*, the Interest will be satisfied from the ContentStore, and the latest notification is returned.   
   The management dispatcher keeps them in an in-memory storage, ready for retrieval subscriber can retrieve missing notifications between *last-received-seq* and the returned latest notification by subscribers. expressing additional Interests without Selectors. 

 ## Notification Alternately, the subscriber 

 The subscriber should can initially request the Name of notification stream with CanBePrefix ChildSelector=rightmost and MustBeFresh elements. MustBeFresh=yes. 
 After a notification is received, the 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, such as 60000ms. Selectors. 
 If any Interest times out (because no notification is delivered within InterestLifetime), the subscriber restarts with the initial request.