Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pub/sub for user-defined policy delivery #69

Open
Zhiyi-Zhang opened this issue Feb 23, 2020 · 1 comment
Open

Use pub/sub for user-defined policy delivery #69

Zhiyi-Zhang opened this issue Feb 23, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@Zhiyi-Zhang
Copy link
Member

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.

@tianyuan129 tianyuan129 added the enhancement New feature or request label Feb 23, 2020
@yoursunny
Copy link
Contributor

yoursunny commented Sep 18, 2020

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.

for (int i = 0; i < 5; i++) {
if (m_pub_sub_state.sub_topics[i].service == NDN_SD_NONE) {
topic = &m_pub_sub_state.sub_topics[i];
}
}
if (topic == NULL) {
NDN_LOG_ERROR("[PUB/SUB] No more space for new subscription topics. Abort");
return;
}

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants