Notification » History » Version 8
Junxiao Shi, 10/29/2018 02:17 AM
1 | 8 | Junxiao Shi | |
---|---|---|---|
2 | 5 | Junxiao Shi | # Notification Stream |
3 | 1 | Junxiao Shi | |
4 | 5 | Junxiao Shi | **Notification Stream** is a mechanism of [[Management|NFD Management protocol]]. |
5 | It is a way to get updates about events happening in the forwarder. |
||
6 | This mechanism is useful for monitoring forwarder state. |
||
7 | 1 | Junxiao Shi | |
8 | ## Naming |
||
9 | |||
10 | * A stream of notifications is published under a certain Name prefix. |
||
11 | * A notification is a Data packet under this Name prefix with a sequence number. |
||
12 | 7 | Junxiao Shi | * The sequence number component is a NameComponentWithMarkerAndNumber, as in [NDN Naming Conventions](http://named-data.net/doc/tech-memos/naming-conventions.pdf). |
13 | This component starts with a 0xFE marker, followed by a nonNegativeInteger. |
||
14 | 1 | Junxiao Shi | * The sequence numbers of notifications in the same stream should be consecutive and increasing. |
15 | * Each notification is limited to one Data packet. |
||
16 | |||
17 | Example: |
||
18 | |||
19 | 7 | Junxiao Shi | ndn:/localhost/nfd/faces/events/%FE%00 // first notification |
20 | ndn:/localhost/nfd/faces/events/%FE%01 // second notification |
||
21 | 1 | Junxiao Shi | |
22 | ## Notification publisher |
||
23 | |||
24 | Notifications from NFD are Data packets generated and signed by NFD. |
||
25 | 8 | Junxiao Shi | FreshnessPeriod should be set to a minimum value (typically 1ms) to facilitate subscriber operations. |
26 | The management dispatcher keeps them in an in-memory storage, ready for retrieval by subscribers. |
||
27 | 1 | Junxiao Shi | |
28 | ## Notification subscriber |
||
29 | |||
30 | 8 | Junxiao Shi | The subscriber should initially request the Name of notification stream with CanBePrefix and MustBeFresh elements. |
31 | After a notification is received, the subscribe can send an Interest for the next anticipated sequence number, without CanBePrefix and MustBeFresh elements. |
||
32 | In both cases, InterestLifetime should be set to a long duration, such as 60000ms. |
||
33 | 7 | Junxiao Shi | If any Interest times out (because no notification is delivered within InterestLifetime), the subscriber restarts with the initial request. |