ndn-lite icon indicating copy to clipboard operation
ndn-lite copied to clipboard

Use pub/sub for user-defined policy delivery

Open Zhiyi-Zhang opened this issue 5 years ago • 1 comments
trafficstars

In the current (6d433ac) ndn-lite, user-defined policies are distributed through signed Interest sent by the controller directly to a device. We may want to change this direct Interest notification to pub/sub mode. That is, each device subscribe to the topics that are:

  1. related to itself, e.g., /home/POLICY/TEMP/bedroom/sensor1
  2. related to the service and the room, e.g. /home/POLICY/TEMP/bedroom
  3. related to the service it serves, e.g., /home/POLICY/TEMP

When the IoT controller generates a new policy, it will send out a notification containing the policy name. A device, say /home/TEMP/bedroom/sensor1, receives this notification, will check whether the policy affects itself. If yes, the device will fetch the new content from the topic, verify the signature, and install the policy.

Zhiyi-Zhang avatar Feb 23 '20 20:02 Zhiyi-Zhang

Given you are talking about "notification", I suppose these are considered command topics.

A major limitation is that, ps_subscribe_to_command can accommodate up to five topics. https://github.com/named-data-iot/ndn-lite/blob/d60a114a4c4e8422577ab8ae3817f79eed948254/app-support/pub-sub.c#L486-L494 This proposal would occupy 60% of available topics.

While it's possible to change this limitation, it would increase memory usage and take NDN-Lite further from being able to run on memory-constrained devices.

P.S. Is NDN-Lite still usable on constrained devices such as the nRF52840?

yoursunny avatar Sep 18 '20 15:09 yoursunny