Project

General

Profile

Notification » History » Version 1

Junxiao Shi, 02/08/2014 10:59 PM

1 1 Junxiao Shi
# NFD Notification mechanism
2
3
NFD Notification mechanism notifies applications about events happening inside NFD.
4
5
## Naming
6
7
* A stream of notifications is published under a certain Name prefix.
8
* A notification is one or more Data packets under this Name prefix with a version number and a segment number.
9
  * The version numbers of notifications in the same stream should be consecutive and increasing.
10
    They are not timestamps.
11
  * In most cases, a notification can fit in one Data packet, and would have segment number `%00`.
12
13
Example:
14
15
    ndn:/localhost/nfd/face/status/2/%FD%00/%00 // first notification, first segment
16
    ndn:/localhost/nfd/face/status/2/%FD%00/%01 // first notification, second segment
17
    ndn:/localhost/nfd/face/status/2/%FD%01/%00 // second notification
18
19
## Notification publisher
20
21
Notifications from NFD are Data packets generated and signed by NFD.
22
23
These Data packets enter forwarding system via the InternalFace, and are subject to regular forwarding pipelines.
24
They should be admitted into the ContentStore.
25
26
## Notification subscriber
27
28
The subscriber should typically request the Name of notification stream (`ndn:/localhost/nfd/face/status/2` in the example) with ChildSelector=1 and Exclude=\<Any>\<Component>*v*\</Component>, where *v* is the version number of the latest received notification.
29
30
* If no new notification has been generated after *v*, this Interest will stay in the PIT, and be satisfied when a new notification is generated.
31
* If one or more new notifications have been generated after *v*, the Interest will be satisfied from the ContentStore, and the latest notification is returned.
32
  The subscriber can retrieve missing notifications between *v* and the returned latest notification by expressing additional Interests.
33
* In the case that a notification has multiple segments, this Interest shall retrieve the first segment.
34
  The subscriber can retrieve subsequent segments by expressing additional Interests.