Notification » History » Revision 8
« Previous |
Revision 8/12
(diff)
| Next »
Junxiao Shi, 10/29/2018 02:17 AM
Notification Stream¶
Notification Stream is a mechanism of 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. 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.
FreshnessPeriod should be set to a minimum value (typically 1ms) to facilitate subscriber operations.
The management dispatcher keeps them in an in-memory storage, ready for retrieval by subscribers.
Notification subscriber¶
The subscriber should initially request the Name of notification stream with CanBePrefix and MustBeFresh elements.
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.
If any Interest times out (because no notification is delivered within InterestLifetime), the subscriber restarts with the initial request.
Updated by Junxiao Shi about 6 years ago · 11 revisions