Project

General

Profile

Notification » History » Version 10

Davide Pesavento, 06/03/2020 04:55 PM

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