Project

General

Profile

Notification » History » Revision 2

Revision 1 (Junxiao Shi, 02/08/2014 10:59 PM) → Revision 2/12 (Junxiao Shi, 02/10/2014 08:58 PM)

# NFD Notification mechanism 

 NFD Notification mechanism notifies applications about events happening inside NFD. 

 ## Naming 

 * A stream of notifications is published under a certain Name prefix. 
 * A notification is a one or more Data packet packets under this Name prefix with a sequence version number and a segment number. 
   * The sequence version numbers of notifications in the same stream should be consecutive and increasing. 
     They are not timestamps. 
   * Each In most cases, a notification is limited to can fit in one Data packet. packet, and would have segment number `%00`. 

 Example: 

     ndn:/localhost/nfd/faces/events/%01 ndn:/localhost/nfd/face/status/2/%FD%00/%00 // first notification notification, first segment 
     ndn:/localhost/nfd/faces/events/%02 ndn:/localhost/nfd/face/status/2/%FD%00/%01 // first notification, second segment 
     ndn:/localhost/nfd/face/status/2/%FD%01/%00 // 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. 
 They should be admitted into the ContentStore. 

 ## Notification subscriber 

 The subscriber should typically request the Name of notification stream (`ndn:/localhost/nfd/faces/events` (`ndn:/localhost/nfd/face/status/2` in the example) with ChildSelector=1 and Exclude=\<Any>\<Component>*seq*\</Component>, Exclude=\<Any>\<Component>*v*\</Component>, where *seq* *v* is the version number of the latest received notification. 

 * If no new notification has been generated after *seq*, *v*, 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 *seq*, *v*, the Interest will be satisfied from the ContentStore, and the latest notification is returned.   
   
   The subscriber can retrieve missing notifications between *seq* *v* and the returned latest notification by expressing additional Interests. 
 * In the case that a notification has multiple segments, this Interest shall retrieve the first segment. 
   The subscriber can retrieve subsequent segments by expressing additional Interests.