From csb17053 at tezu.ac.in Mon May 3 04:53:36 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Mon, 3 May 2021 17:23:36 +0530 Subject: [ndnSIM] Getting all PIT entries of a node. Message-ID: Hello everybody, I am trying to get all the entries in the PIT of a node whenever an interest packet arrives at that node. I am trying to tweak the code in the function onIncomingInterest(ingress, interest) inside NFD/daemon/table/fw/forwarder.cpp. Kindly help me with this, it would be really helpful if either one gives me some hint about the objects i need to make or provide with some example code. Thanking you in advance Prajjwal Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From csb17053 at tezu.ac.in Mon May 3 09:37:23 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Mon, 3 May 2021 22:07:23 +0530 Subject: [ndnSIM] How to add a new field in Interest Packet. Message-ID: Hello all, I am trying to add a new field, Priority, to interest Packets. Till now I have followed this: 1. Add field in tlv.hpp 2. Add member and its getter and setter functions in interest.hpp 3. Implement the functions in interest.cpp 4. Modify the encoding function wireEncode() and decoding function wireDecode() in interest.cpp Then I added some code to set the Priority field for interest packets by SetAttribute features of the ndnHelpers. But now My problem is that the Priority field gets set to default after the first hop. Please help me make this work. Thank you, Prajjwal Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Mon May 3 10:42:12 2021 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Mon, 3 May 2021 13:42:12 -0400 Subject: [ndnSIM] [EXT] How to add a new field in Interest Packet. In-Reply-To: References: Message-ID: Hi Prajjwal If forwarder cannot modify this field: Put it as part of the Name or ApplicationParameters. If forwarder can modify this field: It should be added to the hop-by-hop header. See https://lo.calho.st/posts/ndnsim-custom-fields/ for specific steps. Note that InterestLifetime, Nonce, and HopLimit are modifiable by the forwarder so they technically belong to the hop-by-hop header; they are in Interest due to historic reason. Yours, Junxiao On Mon, May 3, 2021 at 12:37 Prajjwal Singh wrote: > *External Email* > Hello all, > I am trying to add a new field, Priority, to interest Packets. > > Till now I have followed this: > > 1. Add field in tlv.hpp > 2. Add member and its getter and setter functions in interest.hpp > 3. Implement the functions in interest.cpp > 4. Modify the encoding function wireEncode() and decoding function > wireDecode() in interest.cpp > > Then I added some code to set the Priority field for interest packets by > SetAttribute features of the ndnHelpers. > > But now My problem is that the Priority field gets set to default after > the first hop. > Please help me make this work. > > Thank you, > Prajjwal Singh > > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Mon May 3 12:00:57 2021 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Mon, 3 May 2021 15:00:57 -0400 Subject: [ndnSIM] [EXT] Getting all PIT entries of a node. In-Reply-To: References: Message-ID: Hi Prajjwal Forwarder::onIncomingInterest function can access the PIT via m_pit member field of the Forwarder class. The PIT is iterable via standard begin() end() functions. However, if your algorithm depends on PIT enumeration upon every Interest receipt, it likely would not scale. Yours, Junxiao On Mon, May 3, 2021 at 7:54 AM Prajjwal Singh wrote: > *External Email* > Hello everybody, > I am trying to get all the entries in the PIT of a node whenever an > interest packet arrives at that node. > > I am trying to tweak the code in the function onIncomingInterest(ingress, > interest) inside NFD/daemon/table/fw/forwarder.cpp. > > Kindly help me with this, it would be really helpful if either one gives > me some hint about the objects i need to make or provide with some example > code. > > Thanking you in advance > Prajjwal Singh > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csb17053 at tezu.ac.in Mon May 3 12:06:03 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Tue, 4 May 2021 00:36:03 +0530 Subject: [ndnSIM] [EXT] Getting all PIT entries of a node. In-Reply-To: References: Message-ID: Thank you for the information. Specially for the scaling part. I Will try to create some small data structure to track the pit entries I need, hopefully it will help. On Tue, 4 May 2021, 00:31 Junxiao Shi, wrote: > Hi Prajjwal > > Forwarder::onIncomingInterest function can access the PIT via m_pit member > field of the Forwarder class. > The PIT is iterable via standard begin() end() functions. > > However, if your algorithm depends on PIT enumeration upon every Interest > receipt, it likely would not scale. > > Yours, Junxiao > > On Mon, May 3, 2021 at 7:54 AM Prajjwal Singh wrote: > >> *External Email* >> Hello everybody, >> I am trying to get all the entries in the PIT of a node whenever an >> interest packet arrives at that node. >> >> I am trying to tweak the code in the function onIncomingInterest(ingress, >> interest) inside NFD/daemon/table/fw/forwarder.cpp. >> >> Kindly help me with this, it would be really helpful if either one gives >> me some hint about the objects i need to make or provide with some example >> code. >> >> Thanking you in advance >> Prajjwal Singh >> _______________________________________________ >> ndnSIM mailing list >> ndnSIM at lists.cs.ucla.edu >> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csb17053 at tezu.ac.in Mon May 3 21:44:12 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Tue, 4 May 2021 10:14:12 +0530 Subject: [ndnSIM] Adding new field in Interest Packet. Message-ID: Hello everybody, I am trying to add a new field in interest packet and I want this field to persist throughout the network for each interest, (i.e. if a consumer sets this custom field to X in the interest packet, then it should be forwarded by all the routers to the producer with the custom field as X) Previously I had used this tutorial to add the field in interest packet: https://www.programmersought.com/article/14675398024/ Please point out what is lacking in this solution. The main problem is that if i have the following topology A--B--C--D (Where A is the Consumer and D is the Producer, and B and C are routers) Then by the solution given in the above link the custom field set in A's generated Interest packet is reset to default value by B when it forwards the interest to C. How can I make it carry the value intended by A? Thanking you in advance Prajjwal Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From a_djemaa at esi.dz Tue May 4 02:48:17 2021 From: a_djemaa at esi.dz (DJEMAA Adel) Date: Tue, 4 May 2021 10:48:17 +0100 Subject: [ndnSIM] Adding new field in Interest Packet. In-Reply-To: References: Message-ID: Hi, If the packet length doesn't matter in your configuration, I advise you to add a Tag instead of a new Field to your packet, since according to ndnSIM design, the tag resides only in the memory. Also, a Tag can be easily managed directly in the NFD machinery (forwarder class), contrary to a new field in either Interest or Data packets which are generally static objects. Below references showing how to add a new Tag in the packet (HopCountTag which is already implemented in ndnSIM), and it works 100%: - https://www.lists.cs.ucla.edu/pipermail/ndnsim/2018-August/004913.html - https://github.com/named-data-ndnSIM/NFD/commit/0a30676920b9d3f2b2c8bc68e583befc415210cc - https://github.com/named-data-ndnSIM/ndn-cxx/commit/d31b8ef523f4a5b152da88e3d5f47d5697d60772 Hope this helps. Regards. Le mar. 4 mai 2021 ? 05:44, Prajjwal Singh a ?crit : > Hello everybody, > I am trying to add a new field in interest packet and I want this field to > persist throughout the network for each interest, (i.e. if a consumer sets > this custom field to X in the interest packet, then it should be forwarded > by all the routers to the producer with the custom field as X) > > Previously I had used this tutorial to add the field in interest packet: > https://www.programmersought.com/article/14675398024/ > > Please point out what is lacking in this solution. > > The main problem is that if i have the following topology > A--B--C--D > (Where A is the Consumer and D is the Producer, and B and C are routers) > Then by the solution given in the above link the custom field set in A's > generated Interest packet is reset to default value by B when it forwards > the interest to C. > How can I make it carry the value intended by A? > > Thanking you in advance > Prajjwal Singh > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > -- Mr DJAMA Adel Phd student Ecole Militaire Polytechnique Algiers 16046, ALGERIA -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Tue May 4 17:58:36 2021 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Tue, 4 May 2021 20:58:36 -0400 Subject: [ndnSIM] [EXT]Re: Adding new field in Interest Packet. In-Reply-To: References: Message-ID: Hi DJEMAA If the packet length doesn't matter in your configuration, I advise you to > add a Tag instead of a new Field to your packet, since according to ndnSIM > design, the tag resides only in the memory. > Also, a Tag can be easily managed directly in the NFD machinery (forwarder > class), contrary to a new field in either Interest or Data packets which > are generally static objects. > ndnSIM doesn't support ns3::Tag (the kind described in ns-3 model library https://www.nsnam.org/docs/release/3.33/models/html/packets.html#adding-and-removing-tags ). Subclasses of ndn::Tag are completely different from ns3::Tag. This includes the HopCountTag. They must be encoded into the packet buffer to have any effect. >> The main problem is that if i have the following topology >> A--B--C--D >> (Where A is the Consumer and D is the Producer, and B and C are routers) >> Then by the solution given in the above link the custom field set in A's >> generated Interest packet is reset to default value by B when it forwards >> the interest to C. >> How can I make it carry the value intended by A? >> > A *forwarded* Interest is actually a different packet from the original: Name, CanBePrefix, MustBeFresh, ApplicationParameters are copied over, InterestLifetime, Nonce, HopLimit are modified, and other fields may be discarded. As I said previously, it's best to include the information as part of the Name or ApplicationParameters, which is supported universally. While NDN protocol allows having unrecognized non-critical fields in the Interest packet, the protocol is vague on whether and what to preserve during forwarding. So far, as long as Name, CanBePrefix, MustBeFresh, ApplicationParameters, and any fields that appear after ApplicationParameters are preserved, the forwarder implementation would be interoperable. Yours, Junxiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From csb17053 at tezu.ac.in Tue May 4 19:19:31 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Wed, 5 May 2021 07:49:31 +0530 Subject: [ndnSIM] [EXT]Re: Adding new field in Interest Packet. In-Reply-To: References: Message-ID: Thanks to Junxiao and DJEMAA , Junxiao's suggestion is possibly the best, I tried and tested it and it works very well. I also tried the method provided in the aforesaid link , and it works! I had committed a few mistakes that led me into other results. (Like: Messing up wire en/decode methods. And although I did tweak the consumer.cpp's sendPacket() method (for initializing the field (whose value was added through SetAttribute feature of helpers)) but I noticed later that ndn-consumer-zipf-mandelbrot.cpp overrides this function and that was creating all the confusion.) For future reference if anyone struggles with this problem following are the best ways: - Easiest is to (like Junxiao said) put the field in Name or application parameter. - The tag method also works perfectly but it is too much efforts (Check this link ) - The proper method provided here also works perfectly (and is less hassle than tag method) Thanking all of you again Prajjwal Singh On Wed, 5 May 2021, 06:28 Junxiao Shi, wrote: > Hi DJEMAA > > > If the packet length doesn't matter in your configuration, I advise you to >> add a Tag instead of a new Field to your packet, since according to ndnSIM >> design, the tag resides only in the memory. >> Also, a Tag can be easily managed directly in the NFD machinery >> (forwarder class), contrary to a new field in either Interest or Data >> packets which are generally static objects. >> > > ndnSIM doesn't support ns3::Tag (the kind described in ns-3 model library > https://www.nsnam.org/docs/release/3.33/models/html/packets.html#adding-and-removing-tags > ). > Subclasses of ndn::Tag are completely different from ns3::Tag. This > includes the HopCountTag. They must be encoded into the packet buffer to > have any effect. > > >>> The main problem is that if i have the following topology >>> A--B--C--D >>> (Where A is the Consumer and D is the Producer, and B and C are routers) >>> Then by the solution given in the above link the custom field set in A's >>> generated Interest packet is reset to default value by B when it forwards >>> the interest to C. >>> How can I make it carry the value intended by A? >>> >> > A *forwarded* Interest is actually a different packet from the original: > Name, CanBePrefix, MustBeFresh, ApplicationParameters are copied over, > InterestLifetime, Nonce, HopLimit are modified, and other fields may be > discarded. > > As I said previously, it's best to include the information as part of the > Name or ApplicationParameters, which is supported universally. > > While NDN protocol allows having unrecognized non-critical fields in the > Interest packet, the protocol is vague on whether and what to preserve > during forwarding. > So far, as long as Name, CanBePrefix, MustBeFresh, ApplicationParameters, > and any fields that appear after ApplicationParameters are preserved, the > forwarder implementation would be interoperable. > > Yours, Junxiao > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csb17053 at tezu.ac.in Wed May 5 07:15:00 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Wed, 5 May 2021 19:45:00 +0530 Subject: [ndnSIM] Safely removing Pit Entries on receiving new interest. Message-ID: Hello everybody, I am trying to remove a few Pit Entries from the PIT on some basis when a new interest packet arrives. Please guide me which functions can I make use of to remove such entries. Till now I have been doing the following: I have added an extra data structure that keeps (Pit::Entry *) of pit entries. Then I am tweaking forwarder.cpp::onIncomingInterest() function to delete entries. I have tried to use the function m_pit.erase(pit_entry.get()); to delete entries. But, at some point the simulation hangs when some other part of the code tries to delete the entry(which i have already deleted by my added code) and gives me the error: void nfd::pit::Pit::erase(nfd::pit::Entry*, bool): Assertion `nte != nullptr' failed. Thanking you in advance, Prajjwal Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Wed May 5 07:23:01 2021 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Wed, 5 May 2021 10:23:01 -0400 Subject: [ndnSIM] [EXT] Safely removing Pit Entries on receiving new interest. In-Reply-To: References: Message-ID: Hi Prajjwal You may use Strategy::setExpiryTimer or Forwarder::setExpiryTimer, passing zero as timer duration. Strategy::rejectPendingInterest is a shorthand of this operation. This would cause the PIT entry to be erased when the current packet finishes processing. Yours, Junxiao On Wed, May 5, 2021 at 10:15 Prajjwal Singh wrote: > *External Email* > Hello everybody, > I am trying to remove a few Pit Entries from the PIT on some basis when a > new interest packet arrives. > > Please guide me which functions can I make use of to remove such entries. > > Till now I have been doing the following: > > I have added an extra data structure that keeps (Pit::Entry *) of pit > entries. > Then I am tweaking forwarder.cpp::onIncomingInterest() function to delete > entries. > I have tried to use the function m_pit.erase(pit_entry.get()); > to delete entries. > But, at some point the simulation hangs when some other part of the code > tries > to delete the entry(which i have already deleted by my added code) and > gives me the error: > void nfd::pit::Pit::erase(nfd::pit::Entry*, bool): Assertion `nte != > nullptr' failed. > > Thanking you in advance, > Prajjwal Singh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csb17053 at tezu.ac.in Wed May 5 07:56:19 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Wed, 5 May 2021 20:26:19 +0530 Subject: [ndnSIM] [EXT] Safely removing Pit Entries on receiving new interest. In-Reply-To: References: Message-ID: Dear Junxiao, Thank you so much. Forwarder::setExpiryTimer with 0ms worked like a charm. Thanking you again, Prajjwal Singh On Wed, May 5, 2021 at 7:53 PM Junxiao Shi wrote: > Hi Prajjwal > > You may use Strategy::setExpiryTimer or Forwarder::setExpiryTimer, passing > zero as timer duration. > Strategy::rejectPendingInterest is a shorthand of this operation. > This would cause the PIT entry to be erased when the current packet > finishes processing. > > Yours, Junxiao > > On Wed, May 5, 2021 at 10:15 Prajjwal Singh wrote: > >> *External Email* >> Hello everybody, >> I am trying to remove a few Pit Entries from the PIT on some basis when a >> new interest packet arrives. >> >> Please guide me which functions can I make use of to remove such entries. >> >> Till now I have been doing the following: >> >> I have added an extra data structure that keeps (Pit::Entry *) of pit >> entries. >> Then I am tweaking forwarder.cpp::onIncomingInterest() function to delete >> entries. >> I have tried to use the function m_pit.erase(pit_entry.get()); >> to delete entries. >> But, at some point the simulation hangs when some other part of the code >> tries >> to delete the entry(which i have already deleted by my added code) and >> gives me the error: >> void nfd::pit::Pit::erase(nfd::pit::Entry*, bool): Assertion `nte != >> nullptr' failed. >> >> Thanking you in advance, >> Prajjwal Singh >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a_djemaa at esi.dz Wed May 5 15:46:04 2021 From: a_djemaa at esi.dz (DJEMAA Adel) Date: Wed, 5 May 2021 23:46:04 +0100 Subject: [ndnSIM] [EXT]Re: Adding new field in Interest Packet. In-Reply-To: References: Message-ID: Dear Junxiao, thank you for the valuable clarification, Hopefully, this helps ndnSIM community. Yours, Djemaa Le mer. 5 mai 2021 ? 03:19, Prajjwal Singh a ?crit : > Thanks to Junxiao and DJEMAA , > Junxiao's suggestion is possibly the best, I tried and tested it and it > works very well. > > I also tried the method provided in the aforesaid link > , and it works! > I had committed a few mistakes that led me into other results. > (Like: > Messing up wire en/decode methods. > And although I did tweak the consumer.cpp's sendPacket() method > (for initializing the field (whose value was added through SetAttribute > feature of helpers)) > but I noticed later that ndn-consumer-zipf-mandelbrot.cpp overrides this > function and that was > creating all the confusion.) > > For future reference if anyone struggles with this problem following are > the best ways: > > - Easiest is to (like Junxiao said) put the field in Name or > application parameter. > - The tag method also works perfectly but it is too much efforts > (Check this link ) > - The proper method provided here > also works > perfectly (and is less hassle than tag method) > > Thanking all of you again > Prajjwal Singh > > On Wed, 5 May 2021, 06:28 Junxiao Shi, > wrote: > >> Hi DJEMAA >> >> >> If the packet length doesn't matter in your configuration, I advise you >>> to add a Tag instead of a new Field to your packet, since according to >>> ndnSIM design, the tag resides only in the memory. >>> Also, a Tag can be easily managed directly in the NFD machinery >>> (forwarder class), contrary to a new field in either Interest or Data >>> packets which are generally static objects. >>> >> >> ndnSIM doesn't support ns3::Tag (the kind described in ns-3 model library >> https://www.nsnam.org/docs/release/3.33/models/html/packets.html#adding-and-removing-tags >> ). >> Subclasses of ndn::Tag are completely different from ns3::Tag. This >> includes the HopCountTag. They must be encoded into the packet buffer to >> have any effect. >> >> >>>> The main problem is that if i have the following topology >>>> A--B--C--D >>>> (Where A is the Consumer and D is the Producer, and B and C are routers) >>>> Then by the solution given in the above link the custom field set in >>>> A's generated Interest packet is reset to default value by B when it >>>> forwards the interest to C. >>>> How can I make it carry the value intended by A? >>>> >>> >> A *forwarded* Interest is actually a different packet from the original: >> Name, CanBePrefix, MustBeFresh, ApplicationParameters are copied over, >> InterestLifetime, Nonce, HopLimit are modified, and other fields may be >> discarded. >> >> As I said previously, it's best to include the information as part of the >> Name or ApplicationParameters, which is supported universally. >> >> While NDN protocol allows having unrecognized non-critical fields in the >> Interest packet, the protocol is vague on whether and what to preserve >> during forwarding. >> So far, as long as Name, CanBePrefix, MustBeFresh, ApplicationParameters, >> and any fields that appear after ApplicationParameters are preserved, the >> forwarder implementation would be interoperable. >> >> Yours, Junxiao >> > -- Mr DJAMA Adel Phd student Ecole Militaire Polytechnique Algiers 16046, ALGERIA -------------- next part -------------- An HTML attachment was scrubbed... URL: From zohanoor67 at gmail.com Wed May 5 21:42:50 2021 From: zohanoor67 at gmail.com (Sonia) Date: Thu, 6 May 2021 13:42:50 +0900 Subject: [ndnSIM] [EXT] Redundant code in Forwarder::onIncomingData pipeline? In-Reply-To: References: Message-ID: Hi Junxiao, I understand it now. Thank you On Fri, Apr 23, 2021 at 7:06 PM Junxiao Shi wrote: > Hi Sonia > > The condition is testing whether there are more than one *PIT entry*, not > downstream face. > Strategy::afterReceiveData can be overridden in subclass, so it's not an > exact duplicate. > See https://redmine.named-data.net/issues/4290 for reasoning. > > Yours, Junxiao > > On Fri, Apr 23, 2021, 03:43 Sonia via ndnSIM > wrote: > >> Hi, >> >> Please guide me if I am missing something. >> >> In onIncomingData pipeline when there is at least one PIT entry match ( >> if (pitMatches.size() == 1) { ....... ) it calls >> Strategy.afterReceiveData() method and this method sends data to all >> pending down streams via its this->sendDataToAll(pitEntry, inFace, >> data); method. >> >> My question is then why the else statement (for multiple >> downstream faces) is there in Forwarder::onIncomingData pipeline. Isn't >> this code redundant as the Strategy.afterReceiveData() method already have >> implemented the same logic? >> >> My second concern is that I have run many scenarios (both p2p and adhoc) >> and multiple strategies (including multicast and broadcast), but I always >> get only one downstream face never got more than 1 pending downstream face. >> I checked it in Forwarder log. >> >> Any quidance will be highly appreciated. >> >> Thanks >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.binnendyk at student.nmt.edu Fri May 7 21:11:55 2021 From: eric.binnendyk at student.nmt.edu (Eric Binnendyk) Date: Fri, 7 May 2021 22:11:55 -0600 Subject: [ndnSIM] Neural networks in ndnSIM Message-ID: Hi, I'm trying to implement a neural network to do forwarding in ndnSIM. I know this is possible to do in ndnSIM because these papers do it: https://www.mdpi.com/1424-8220/18/10/3354/htm, https://dl.acm.org/doi/pdf/10.1145/3229543.3229547. Does anyone have any recommendations on how to implement a neural network? If possible, I would like to do it in Python even though most of the ndnSIM code is in C++. Is it possible to use the Python bindings to write a forwarding strategy in Python, so that I can use a neural network library like keras? Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Sat May 8 06:24:19 2021 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Sat, 8 May 2021 09:24:19 -0400 Subject: [ndnSIM] [EXT] Neural networks in ndnSIM In-Reply-To: References: Message-ID: Hi Eric > I'm trying to implement a neural network to do forwarding in ndnSIM. I > know this is possible to do in ndnSIM because these papers do it: > https://www.mdpi.com/1424-8220/18/10/3354/htm, > https://dl.acm.org/doi/pdf/10.1145/3229543.3229547. > > Does anyone have any recommendations on how to implement a neural network? > If possible, I would like to do it in Python even though most of the ndnSIM > code is in C++. Is it possible to use the Python bindings to write a > forwarding strategy in Python, so that I can use a neural network library > like keras? > Forwarding strategy is normally a C++ class that is called synchronously. C++ code can invoke Python synchronously. Implementing part of the forwarding strategy logic in Python wouldn't be easy or performant, but I don't see major roadblock. It would not be a "binding" though, because a "binding" typically refers to calling C++ code from Python, not the other way around. Another possibility is performing machine learning asynchronously. In this approach, the forwarding strategy (C++) and the neural network (Python) share a common data structure, but do not interact with each other on a per packet basis. The forwarding strategy makes immediate decisions based on what's already in the data structure, and stores the outcome (e.g. satisfy ratio and RTT) into the data structure. The neural network periodically reads from the date structure, does its magic, and writes to the data structure to influence future forwarding decisions. Yours, Junxiao > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.binnendyk at student.nmt.edu Sat May 8 12:52:43 2021 From: eric.binnendyk at student.nmt.edu (Eric Binnendyk) Date: Sat, 8 May 2021 13:52:43 -0600 Subject: [ndnSIM] [EXT] Neural networks in ndnSIM In-Reply-To: References: Message-ID: Hi Junxiao, Thanks so much for the reply. It really clears up some questions I had about how to use ndnSIM. I'll probably implement it the asynchronous way and have the C++ and Python code communicate using files. Eric On Sat, May 8, 2021 at 7:24 AM Junxiao Shi wrote: > Hi Eric > > >> I'm trying to implement a neural network to do forwarding in ndnSIM. I >> know this is possible to do in ndnSIM because these papers do it: >> https://www.mdpi.com/1424-8220/18/10/3354/htm, >> https://dl.acm.org/doi/pdf/10.1145/3229543.3229547. >> >> Does anyone have any recommendations on how to implement a neural >> network? If possible, I would like to do it in Python even though most of >> the ndnSIM code is in C++. Is it possible to use the Python bindings to >> write a forwarding strategy in Python, so that I can use a neural network >> library like keras? >> > > Forwarding strategy is normally a C++ class that is called synchronously. > C++ code can invoke Python synchronously. > Implementing part of the forwarding strategy logic in Python wouldn't be > easy or performant, but I don't see major roadblock. > It would not be a "binding" though, because a "binding" typically refers > to calling C++ code from Python, not the other way around. > > Another possibility is performing machine learning asynchronously. > In this approach, the forwarding strategy (C++) and the neural network > (Python) share a common data structure, but do not interact with each other > on a per packet basis. > The forwarding strategy makes immediate decisions based on what's already > in the data structure, and stores the outcome (e.g. satisfy ratio and RTT) > into the data structure. > The neural network periodically reads from the date structure, does its > magic, and writes to the data structure to influence future forwarding > decisions. > > Yours, Junxiao > >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From ygor.amaral at gmail.com Tue May 11 11:47:28 2021 From: ygor.amaral at gmail.com (Ygor Amaral) Date: Tue, 11 May 2021 15:47:28 -0300 Subject: [ndnSIM] [EXT] Neural networks in ndnSIM In-Reply-To: References: Message-ID: Hi Eric, Perhaps the use of sockets can be a more efficient approach to inter-process communication than files. When your strategy is initialized, the strategy runs the python application and establishes the socket with it. Whenever your strategy is to decide the next hop, it will send via socket the status information to the neural network (python application) and receive via socket the decision. Remember that each node will have its own instance of the NFD forwarder. Do you want to use a neural network for each node or a single one instance of the neural network for all nodes? This is an important detail. Regards, Ygor Amaral On Sat, May 8, 2021 at 4:53 PM Eric Binnendyk via ndnSIM < ndnsim at lists.cs.ucla.edu> wrote: > Hi Junxiao, > > Thanks so much for the reply. It really clears up some questions I had > about how to use ndnSIM. I'll probably implement it the asynchronous way > and have the C++ and Python code communicate using files. > > Eric > > On Sat, May 8, 2021 at 7:24 AM Junxiao Shi > wrote: > >> Hi Eric >> >> >>> I'm trying to implement a neural network to do forwarding in ndnSIM. I >>> know this is possible to do in ndnSIM because these papers do it: >>> https://www.mdpi.com/1424-8220/18/10/3354/htm, >>> https://dl.acm.org/doi/pdf/10.1145/3229543.3229547. >>> >>> Does anyone have any recommendations on how to implement a neural >>> network? If possible, I would like to do it in Python even though most of >>> the ndnSIM code is in C++. Is it possible to use the Python bindings to >>> write a forwarding strategy in Python, so that I can use a neural network >>> library like keras? >>> >> >> Forwarding strategy is normally a C++ class that is called synchronously. >> C++ code can invoke Python synchronously. >> Implementing part of the forwarding strategy logic in Python wouldn't be >> easy or performant, but I don't see major roadblock. >> It would not be a "binding" though, because a "binding" typically refers >> to calling C++ code from Python, not the other way around. >> >> Another possibility is performing machine learning asynchronously. >> In this approach, the forwarding strategy (C++) and the neural network >> (Python) share a common data structure, but do not interact with each other >> on a per packet basis. >> The forwarding strategy makes immediate decisions based on what's already >> in the data structure, and stores the outcome (e.g. satisfy ratio and RTT) >> into the data structure. >> The neural network periodically reads from the date structure, does its >> magic, and writes to the data structure to influence future forwarding >> decisions. >> >> Yours, Junxiao >> >>> _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leandrinos54 at hotmail.com Wed May 12 15:14:44 2021 From: leandrinos54 at hotmail.com (Leandro Alves) Date: Wed, 12 May 2021 22:14:44 +0000 Subject: [ndnSIM] Interests are not being satisfied Message-ID: Hello all, I created a new application for generate Interests and Data to discovery neighbors, similar to what happens in OLSR Routing. Generated Interests only have one prefix ?/neighbor? and I tagged them with NextHopfaceId to be sended directly to the network. Produced Data packets have the location of the neighbor attached as a tag. Since this Interests are generated in intervals of 1 second (this value could be greater) and always has to be satisfied with new Data, I made some changes to Forwarder class to not check the Content Store. So, my problem is that only the first generated Interest is satisfied, consequent Interests are not send to the network via NetDevice. Can anyone help me trying to figure this out, because I don?t understand why this is happening Thanks in advance, Leandro Alves -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.binnendyk at student.nmt.edu Fri May 14 14:03:27 2021 From: eric.binnendyk at student.nmt.edu (Eric Binnendyk) Date: Fri, 14 May 2021 15:03:27 -0600 Subject: [ndnSIM] Getting the origin of an Interest Message-ID: Hi, In the forwarding strategy code, I am trying to find the node that an incoming Interest originated from. I suspect that this information is somewhere in the PIT entry (possibly in pitEntry->getInRecords()), however I cannot figure out how to find it. Does anyone know how to find the origin node of an Interest? I expect the code will look something like this: if (pitEntry->getInRecord()->...->origin == nodes.Get(i)) { num_interests_per_origin[i] += 1; } } Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Fri May 14 14:23:30 2021 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Fri, 14 May 2021 17:23:30 -0400 Subject: [ndnSIM] [EXT] Getting the origin of an Interest In-Reply-To: References: Message-ID: Hi Eric It isn't possible for a forwarder to know the origin *node* of an Interest, unless the consumer explicitly identifies itself as part of the Interest name. The forwarder can only know the incoming *face* of an Interest, which is either the consumer node or another forwarder closer to the consumer. This is a privacy property of the NDN network: it maintains that the consumer would remain anonymous to network forwarders and producers, except the forwarder directly adjacent to the consumer. In comparison, an IP packet would always identify the origin node in the source IP address field. Yours, Junxiao On Fri, May 14, 2021 at 5:03 PM Eric Binnendyk via ndnSIM < ndnsim at lists.cs.ucla.edu> wrote: > *External Email* > Hi, > > In the forwarding strategy code, I am trying to find the node that an > incoming Interest originated from. I suspect that this information is > somewhere in the PIT entry (possibly in pitEntry->getInRecords()), however > I cannot figure out how to find it. > > Does anyone know how to find the origin node of an Interest? I expect the > code will look something like this: > > if (pitEntry->getInRecord()->...->origin == nodes.Get(i)) { > num_interests_per_origin[i] += 1; > } > } > > Thanks, > > Eric > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.binnendyk at student.nmt.edu Fri May 14 17:52:33 2021 From: eric.binnendyk at student.nmt.edu (Eric Binnendyk) Date: Fri, 14 May 2021 18:52:33 -0600 Subject: [ndnSIM] [EXT] Getting the origin of an Interest In-Reply-To: References: Message-ID: Great, thanks for clearing that up! On Fri, May 14, 2021 at 3:24 PM Junxiao Shi wrote: > Hi Eric > > It isn't possible for a forwarder to know the origin *node* of an > Interest, unless the consumer explicitly identifies itself as part of the > Interest name. > The forwarder can only know the incoming *face* of an Interest, which is > either the consumer node or another forwarder closer to the consumer. > > This is a privacy property of the NDN network: it maintains that the > consumer would remain anonymous to network forwarders and producers, except > the forwarder directly adjacent to the consumer. > In comparison, an IP packet would always identify the origin node in the > source IP address field. > > Yours, Junxiao > > > On Fri, May 14, 2021 at 5:03 PM Eric Binnendyk via ndnSIM < > ndnsim at lists.cs.ucla.edu> wrote: > >> *External Email* >> Hi, >> >> In the forwarding strategy code, I am trying to find the node that an >> incoming Interest originated from. I suspect that this information is >> somewhere in the PIT entry (possibly in pitEntry->getInRecords()), however >> I cannot figure out how to find it. >> >> Does anyone know how to find the origin node of an Interest? I expect the >> code will look something like this: >> >> if (pitEntry->getInRecord()->...->origin == nodes.Get(i)) { >> num_interests_per_origin[i] += 1; >> } >> } >> >> Thanks, >> >> Eric >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From arundhatiarjaria07 at gmail.com Wed May 19 09:10:40 2021 From: arundhatiarjaria07 at gmail.com (ARUNDHATI ARJARIA) Date: Wed, 19 May 2021 21:40:40 +0530 Subject: [ndnSIM] Data structures in NDN / HT, BF etc Message-ID: Hello Dears, I want to work on lookup strategies (HAsh Table, Trie structure and Bloom filter). Please help me to know where I can see these data structures in NDN Forwarder/ NFD & how can I see and evaluate the performance of these data structures so that I can understand well for further analysis. Thanks. -- *Arundhati Arjaria* *Research Scholar (Department of Computer Science & Engineering)* *PDPM-Indian Institute of Information Technology, Design and Manufacturing, Jabalpur* *(An Institute of National Importance, established by MHRD, Govt. of India)* Dumna Airport Road, P.O. Khamaria, Jabalpur (M.P.)-482005. Ph.: (+91) 8319656284, (+91) 8989486561 Email: 20pcs01 at iiitdmj.ac.in, arundhatiarjaria07 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Wed May 19 09:31:24 2021 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Wed, 19 May 2021 12:31:24 -0400 Subject: [ndnSIM] [EXT] Data structures in NDN / HT, BF etc In-Reply-To: References: Message-ID: Hi ARUNDHATI Data structure performance is not modeled in ndnSIM. Every data structure lookup or mutation takes zero seconds of simulated time. To measure the performance of a forwarder and its data structures, you need to run the forwarder standalone, not as part of ns-3 simulation. Look into the Mini-NDN emulator if you want to run multiple instances on a simulated network. Source code of data structures in several NDN forwarders: https://github.com/usnistgov/ndn-dpdk/tree/4d388636020f679d00c70acaa703332082746d0e/container https://github.com/named-data/NFD/tree/6a699be8cdc667bf285e56ec9a247c285cd514c3/daemon/table https://github.com/eric135/YaNFD/tree/a4132a8c28c87477e401d4fef74a9a3db979a7c1/table https://github.com/named-data-iot/ndn-lite/tree/6739d9c4d7d4f995a96ec071740f8f61d6f81338/forwarder (ignore the name-splay.*, it's dead code) Yours, Junxiao On Wed, May 19, 2021 at 12:11 PM ARUNDHATI ARJARIA via ndnSIM < ndnsim at lists.cs.ucla.edu> wrote: > *External Email* > Hello Dears, > > I want to work on lookup strategies (HAsh Table, Trie structure and Bloom > filter). > > Please help me to know where I can see these data structures in NDN > Forwarder/ NFD & how can I see and evaluate the performance of these data > structures so that I can understand well for further analysis. > > Thanks. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arundhatiarjaria07 at gmail.com Wed May 19 20:02:32 2021 From: arundhatiarjaria07 at gmail.com (ARUNDHATI ARJARIA) Date: Thu, 20 May 2021 08:32:32 +0530 Subject: [ndnSIM] [EXT] Data structures in NDN / HT, BF etc In-Reply-To: References: Message-ID: Thanks, I'll check them out. On Wed, May 19, 2021 at 10:02 PM Junxiao Shi wrote: > Hi ARUNDHATI > > Data structure performance is not modeled in ndnSIM. > Every data structure lookup or mutation takes zero seconds of simulated > time. > > To measure the performance of a forwarder and its data structures, you > need to run the forwarder standalone, not as part of ns-3 simulation. > Look into the Mini-NDN emulator if you want to run multiple instances on a > simulated network. > > Source code of data structures in several NDN forwarders: > > https://github.com/usnistgov/ndn-dpdk/tree/4d388636020f679d00c70acaa703332082746d0e/container > > https://github.com/named-data/NFD/tree/6a699be8cdc667bf285e56ec9a247c285cd514c3/daemon/table > > https://github.com/eric135/YaNFD/tree/a4132a8c28c87477e401d4fef74a9a3db979a7c1/table > > https://github.com/named-data-iot/ndn-lite/tree/6739d9c4d7d4f995a96ec071740f8f61d6f81338/forwarder > (ignore the name-splay.*, it's dead code) > > Yours, Junxiao > > On Wed, May 19, 2021 at 12:11 PM ARUNDHATI ARJARIA via ndnSIM < > ndnsim at lists.cs.ucla.edu> wrote: > >> *External Email* >> Hello Dears, >> >> I want to work on lookup strategies (HAsh Table, Trie structure and Bloom >> filter). >> >> Please help me to know where I can see these data structures in NDN >> Forwarder/ NFD & how can I see and evaluate the performance of these data >> structures so that I can understand well for further analysis. >> >> Thanks. >> >> >> -- *Arundhati Arjaria* *Research Scholar (Department of Computer Science & Engineering)* *PDPM-Indian Institute of Information Technology, Design and Manufacturing, Jabalpur* *(An Institute of National Importance, established by MHRD, Govt. of India)* Dumna Airport Road, P.O. Khamaria, Jabalpur (M.P.)-482005. Ph.: (+91) 8319656284, (+91) 8989486561 Email: 20pcs01 at iiitdmj.ac.in, arundhatiarjaria07 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From csb17053 at tezu.ac.in Thu May 27 09:33:49 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Thu, 27 May 2021 22:03:49 +0530 Subject: [ndnSIM] Instantaneous Incoming and Satisfied Interest Rate. Message-ID: Hello everybody, Is there a way to calculate the instantaneous rate of incoming interest and the instantaneous rate of satisfied interests for a node in ndn. Thank you in advance Prajjwal Singh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ygor.amaral at gmail.com Thu May 27 10:50:53 2021 From: ygor.amaral at gmail.com (Ygor Amaral) Date: Thu, 27 May 2021 14:50:53 -0300 Subject: [ndnSIM] Instantaneous Incoming and Satisfied Interest Rate. In-Reply-To: References: Message-ID: Hi Prajjwal, L3RateTracer will help you calculate these metrics. You can choose the periodicity to collect the data. With the data provided by L3RateTracer, you can calculate rates, for example. This is sufficient for most cases. However, if only the instantaneous event interests you (each unique event), I think you will need to develop your own trace. Regards, Ygor Amaral On Thu, May 27, 2021 at 1:34 PM Prajjwal Singh wrote: > Hello everybody, > Is there a way to calculate the instantaneous rate of incoming interest > and the instantaneous rate of satisfied interests for a node in ndn. > > Thank you in advance > Prajjwal Singh. > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csb17053 at tezu.ac.in Thu May 27 11:16:24 2021 From: csb17053 at tezu.ac.in (Prajjwal Singh) Date: Thu, 27 May 2021 23:46:24 +0530 Subject: [ndnSIM] Instantaneous Incoming and Satisfied Interest Rate. In-Reply-To: References: Message-ID: Thank you Ygor, I Will test how L3RateTracer can help me, and will get back to you. On Thu, May 27, 2021 at 11:21 PM Ygor Amaral wrote: > Hi Prajjwal, > > L3RateTracer will help you calculate these metrics. You can choose the > periodicity to collect the data. > > With the data provided by L3RateTracer, you can calculate rates, for > example. > > This is sufficient for most cases. However, if only the instantaneous > event interests you (each unique event), I think you will need to develop > your own trace. > > Regards, > Ygor Amaral > > On Thu, May 27, 2021 at 1:34 PM Prajjwal Singh > wrote: > >> Hello everybody, >> Is there a way to calculate the instantaneous rate of incoming interest >> and the instantaneous rate of satisfied interests for a node in ndn. >> >> Thank you in advance >> Prajjwal Singh. >> _______________________________________________ >> ndnSIM mailing list >> ndnSIM at lists.cs.ucla.edu >> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: