[Nfd-dev] Push function in NDN

Ashlesh Gawande (agawande) agawande at memphis.edu
Fri Jul 27 09:01:43 PDT 2018


1) You can use the multicast strategy:

nfdc strategy set prefix /notificiation strategy /localhost/nfd/strategy/multicast


2) Notification stream can be used in applications by using the dispatcher (NFD uses the dispatcher):

https://github.com/named-data/ndn-cxx/blob/master/src/mgmt/dispatcher.hpp.

Producer example:

(ndn::mgmt::PostNotification) m_postNotification = m_dispatcher.addNotificationStream("insert");  m_dispatcher.addTopPrefix(Name("test"));


When producer wants to post a notification:

m_postNotification(data.wireEncode());


For consumer, use the notification subscriber (I provided Data for the template):

https://github.com/named-data/ndn-cxx/blob/master/src/util/notification-subscriber.hpp

(Note: a crucial requirement I missed when I was using it:

https://github.com/named-data/ndn-cxx/blob/master/src/util/notification-subscriber.hpp#L49)


If you are still looking for pub-sub, PSync library is ready to use:

https://gerrit.named-data.net/#/c/PSync/+/4824/

I still have to implement segmentation for hello data and sync data for partial sync for bigger sized data. I will do that once the initial code is merge (https://redmine.named-data.net/issues/4662)<https://redmine.named-data.net/issues/4662>

Any issues welcome on the redmine:

https://redmine.named-data.net/projects/psync/issues


Ashlesh

________________________________
From: Nfd-dev <nfd-dev-bounces at lists.cs.ucla.edu> on behalf of Lee, Jongdeog <jlee700 at illinois.edu>
Sent: Thursday, July 26, 2018 8:32:36 PM
To: nfd-dev at lists.cs.ucla.edu
Subject: [Nfd-dev] Push function in NDN

Dear NDN folks,
  Hope all is well.
  I have a question about a push function (from one publisher to multiple subscribers) in NDN.

1. It seems the simplest way to implement such function is to send one interest packet to multiple producers. However, NFD only forwards one interest to one producer by default.
  Is there any way to multicast one interest?
  For example, if three producers advertise same prefix '/notification' and one consumer issues interest '/notificiation/1', I would like to send the interest to all three producers.

2. Junxiao mentioned there is notification stream in NFD that keeps update NFD status info. Is it usable in application layer as well? (like consumer-producer model). If then, is there any example code for that?

  Thanks for reading!

Best wishes,
Jongdeog Lee (JD)

------------------------------------------------
Ph.D. Student
Department of Computer Science
University of Illinois at Urbana-Champaign
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20180727/d7ce67a7/attachment-0001.html>


More information about the Nfd-dev mailing list