From alexander.afanasyev at ucla.edu Sun Sep 1 10:42:08 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Sun, 1 Sep 2013 10:42:08 -0700 Subject: [ndnSIM] Retransmitted Interests In-Reply-To: References: Message-ID: Hi Mahammad, Can you try adding the following line Simulator::Cancel (m_retxEvent); into ndn-consumer.cc, just after the line 161 and check again? I have a suspicion that the Stop command didn't fully work in the consumer and it kept sending requests. --- Alex On Aug 31, 2013, at 10:12 AM, Hovaidi Ardestani Mohammad wrote: > Dear Alex > I have a scenario in which NDN requesters sends their Interests with dynamic rate. I have put several functions to set the rates to achieve this goal. My problem is that number of OutInterests shows a cumulative numbers during the simulation. For Instance in first interval the sending rate is 300 packets per seconds and the next time interval the rate is double, but OutInterests rate shows almost triple at the end. I am just wondering whether this additional numbers are due to the retransmission of delayed Interests or there is another reason of which I am not aware. > > BTW, I used the following to stop sending rate at the end of every time interval: > > ApplicationContainer allconsumers = consumerHelper.Install(consumers[i]); > allconsumers.Stop(Seconds (4)); > > Thank you for your response in advance! > -Mohammad > _______________________________________________ > 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 blindeafer at 163.com Sun Sep 1 18:50:03 2013 From: blindeafer at 163.com (=?GBK?B?s8LKpMC2?=) Date: Mon, 2 Sep 2013 09:50:03 +0800 (CST) Subject: [ndnSIM] reset FwHopCountTag Message-ID: <77137341.876e.140dc5cc914.Coremail.blindeafer@163.com> Hi All, I would like to reset the member m_hopCount of hopCountTag to 0 before the node send the content to satisfy interests if it cache the content, which function and how can I modify the code,would you please give me some hints? Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Mon Sep 2 10:02:05 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Mon, 2 Sep 2013 10:02:05 -0700 Subject: [ndnSIM] reset FwHopCountTag In-Reply-To: <77137341.876e.140dc5cc914.Coremail.blindeafer@163.com> References: <77137341.876e.140dc5cc914.Coremail.blindeafer@163.com> Message-ID: <9C7CBACD-5ACA-4580-9CB0-5A90131D6693@ucla.edu> Hi! You can update code in model/fw/ndn-forwarding-strategy.cc around lines 185-189. In the current form, the hop count tag is echoed from the interest. If you simply add tag without peeking the interest tag first, you'll get a reset value: That is, you ned something like this: FwHopCountTag hopCountTag; contentObject->GetPayload ()->AddPacketTag (hopCountTag); --- Alex On Sep 1, 2013, at 6:50 PM, ??? wrote: > Hi All, > I would like to reset the member m_hopCount of hopCountTag to 0 before the node send the content to satisfy interests if it cache the content, which function and how can I modify the code,would you please give me some hints? > > Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blindeafer at 163.com Wed Sep 4 01:06:27 2013 From: blindeafer at 163.com (=?GBK?B?s8LKpMC2?=) Date: Wed, 4 Sep 2013 16:06:27 +0800 (CST) Subject: [ndnSIM] Packet-level trace Message-ID: <4982b679.25a74.140e8021d66.Coremail.blindeafer@163.com> Hi All, would you please tell me that What is the difference between packets and packetraw in txtfile from L3 rate trace? Thank you. Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioannoa at scss.tcd.ie Wed Sep 4 02:18:03 2013 From: ioannoa at scss.tcd.ie (ioannoa at scss.tcd.ie) Date: Wed, 4 Sep 2013 10:18:03 +0100 Subject: [ndnSIM] [Fwd: Re: [Fwd: Replacement metric]] Message-ID: <0bb6b9c272c18d5d92ad1bd829dbbfd6.squirrel@webmail.scss.tcd.ie> Hello all, I have a problem regarding the how to collect results from a content store. I have implemented a new content-store-impl class with 2 more functions ************************************ double probability; //(+) void SetCacheProbability(double probability); //(+) double GetCacheProbability () const;//(+) .AddAttribute ("CacheProbability", //(+) "Set probability of caching in ContentStore. If 1, every content is cached. If 0, no content is cached.",//(+) StringValue ("1.0"),//(+) MakeDoubleAccessor (&ContentStoreImpl< Policy >::GetCacheProbability,//(+) &ContentStoreImpl< Policy >::SetCacheProbability),MakeDoubleChecker ()) //(+) ************************************ and also the lru-lfu-fifo-random classes ***************************************** inline void//(+) set_probability (double probability) { probability_ = probability; } inline double//(+) get_probability () const { return probability_; } *********************************************** having the same functions included. I want though to use the content-store-with-stats class so as get my results. How do i link these all together? I tried to modify the multi-policy class to include my functions also but it seems that pit is also using it, so shouldn't do that. I also tried to make a new multi-policy and new lifetime-policy so as to put these in the content-store-with-stats new implementation but i still had loads of errors coming i think including the trie-with-policy class. Thanks in advance. A. > Which line it complains exactly? About your "void CacheEntryRemoved > (std::string context, Ptr" function or something > else? > > Most likely some include is missing, but I cant yet guess which exactly. > > --- > Alex > > On Sep 1, 2013, at 12:21 PM, ioannoa at scss.tcd.ie wrote: > >> Yeah, i did something like that. But, anyway at the very end i thought >> that since all approaches are gonna be tested under the same patterns, >> it >> wouldn't mind so as to compare them. >> >> Anyway, one other is that i was simply trying to include the lifetime at >> the cs-tracer. A simple simulation example seems to work fine, >> >> e.g. >> >> ................................................ >> #include >> >> using namespace ns3; >> >> void >> CacheEntryRemoved (std::string context, Ptr >> entry,Time lifetime) >> { >> std::cout << entry->GetName () << " " << lifetime.ToDouble (Time::S) >> << "s" << std::endl; >> } >> >> int >> main (int argc, char *argv[]) >> { >> // setting default parameters for PointToPoint links and channels >> ................................................ >> // Read optional command-line parameters (e.g., enable visualizer with >> ./waf --run=<> --visualize >> ................................................ >> // Creating nodes >> ................................................ >> // Connecting nodes using two links >> ................................................ >> // Install NDN stack on all nodes >> ................................................ >> ndnHelper.SetContentStore ("ns3::ndn::cs::Stats::Lru", "MaxSize", "2"); >> // (+)//~ >> ndnHelper.InstallAll (); >> Config::Connect >> ("/NodeList/*/$ns3::ndn::cs::Stats::Lru/WillRemoveEntry", >> MakeCallback (CacheEntryRemoved));//(+) >> >> but when i try to put that into the cs-tracer i get an error of : >> error: ISO C++ forbids declaration of ?type name? with no type >> error: template argument 1 is invalid >> >> that goes to the string declaration? What is that i am missing here? >> >> A. >> >>> Yes. The tracers will do that and it was done semi-intentionally, since >>> some tracers use time period as a base for averaging and doing such >>> averaging could be problematic (or even impossible) in some cases. >>> >>> The trick that I was using in my simulations is just to set simulation >>> time a little bit longer. Like not 2 seconds exactly, but 2 seconds + 1 >>> nanosecond or something. This way the tracer print event will be >>> properly >>> executed. >>> >>> Would this work for you? >>> >>> --- >>> Alex >>> >>> On Aug 31, 2013, at 6:41 AM, ioannoa at scss.tcd.ie wrote: >>> >>>> Hey Alex, >>>> >>>> just a quick question that i just now realized. >>>> >>>> Is the case in all the tracers that do not actually present the latest >>>> measurements calculated. e.g. picking a time interval of 1.0 sec for >>>> my >>>> tracers and putting my simulation time also to 1.0 i get no outputs >>>> for >>>> all actually the tracers except the app-delays one. >>>> >>>> For example I used an experiment of 2.0 seconds with sending up to 10 >>>> interest in each sec. so i am getting 20 prints that an interest >>>> reached >>>> the producer application (i print in the OnInterest of the producer >>>> app). >>>> However, the tracer gives me up to 10 when i use a time interval of >>>> 1.0 >>>> sec and up to 15 when i use an interval of 0.5 sec. I should get my 20 >>>> but >>>> i suspect that i don't cause the simulation ends first! Is there a way >>>> i >>>> can actually get the final results too? >>>> >>>> >>>> Andriana. >>>> >>>>> Got it. I think you can either use directly or with some >>>>> modification >>>>> ContentStoreWithStats (model/cs/content-store-with-stats.h|cc and >>>>> model/cs/custom-policies/lifetime-stats-policy.h) >>>>> >>>>> Basically, "policy" can be bundled list of several different policies >>>>> (I >>>>> called it multi-policy). In this particular case, I'm bundling >>>>> lifetime-stats-policy with any other policy available (if you're >>>>> working >>>>> on you own, you just need to instantiate it, see .cc file). >>>>> >>>>> I hope the code is not too confusing :) >>>>> >>>>> --- >>>>> Alex >>>>> >>>>> On Aug 30, 2013, at 2:51 PM, ioannoa at scss.tcd.ie wrote: >>>>> >>>>>> Hi Alex, >>>>>> >>>>>> no worries. You should have like loads in mind from people sending >>>>>> over. >>>>>> >>>>>> What i want to count is the number of replacements that happen in >>>>>> each >>>>>> content store of each ndn node. Cache misses and cache hits can be >>>>>> calculated in the content store but content store does not know when >>>>>> a >>>>>> replacement of a content is made in the content store when the Add >>>>>> function is called. The Add function makes use of the insert >>>>>> function >>>>>> of >>>>>> the trie class (lru, lfu, fifo, random ) depending on the policy. >>>>>> So, >>>>>> I >>>>>> would like to calculate that, though not be restricted by one policy >>>>>> only. >>>>>> >>>>>> >>>>>> So, sth like this in the lru policy (but ideally not restricted by >>>>>> one >>>>>> policy) >>>>>> >>>>>> inline bool >>>>>> insert (typename parent_trie::iterator item) >>>>>> { >>>>>> std::cout << "This is Lru class!" << std::endl; >>>>>> >>>>>> if (max_size_ != 0 && policy_container::size () >= max_size_) >>>>>> { >>>>>> base_.erase (&(*policy_container::begin ())); >>>>>> >>>>>> ----------------------------------------------------------------------------------- >>>>>> ---->>>> num_of_replacements = num_of_replacements + 1; >>>>>> ----------------------------------------------------------------------------------- >>>>>> >>>>>> } >>>>>> >>>>>> policy_container::push_back (*item); >>>>>> return true; >>>>>> } >>>>>> >>>>>> >>>>>> Did that make any sense? >>>>>> >>>>>> Kind regards, >>>>>> Andriana. >>>>>> >>>>>> >>>>>>> Oh sorry. Forgot to reply on that. I'm actually a little bit >>>>>>> confused >>>>>>> on >>>>>>> what exactly is your objective and what is the problem. >>>>>>> "CacheHits" >>>>>>> and >>>>>>> "CacheMisses" are traces that available for any content store with >>>>>>> any >>>>>>> cache policy and ndn::CsTracer can be used to get the data. Are >>>>>>> you >>>>>>> referring to something else? >>>>>>> >>>>>>> --- >>>>>>> Alex >>>>>>> >>>>>>> On Aug 30, 2013, at 11:20 AM, ioannoa at scss.tcd.ie wrote: >>>>>>> >>>>>>>> Hello Alex, >>>>>>>> >>>>>>>> Many thanks for the reply. >>>>>>>> >>>>>>>> The one seems to work fine. I thought it was for getting the id of >>>>>>>> each >>>>>>>> application, so did not count it as a factor. >>>>>>>> >>>>>>>> I actually posted an other question before this, >>>>>>>> >>>>>>>> --------------------------------------------------------- >>>>>>>> >>>>>>>>>> I am trying to implement a replacement metric, similar to the >>>>>>>>>> one >>>>>>>>>> used >>>>>>>>>> for >>>>>>>>>> cache hits and cache misses in content store. My issue is though >>>>>>>>>> that >>>>>>>>>> replacement counts are not calculated in the content store but >>>>>>>>>> rather >>>>>>>>>> to >>>>>>>>>> each replacement policy used. Would someone advice which way >>>>>>>>>> would >>>>>>>>>> be >>>>>>>>>> proper to try to do so? I have found this post related to: >>>>>>>>>> http://www.lists.cs.ucla.edu/pipermail/ndnsim/2012-December/000007.html >>>>>>>>>> would the creation of a new policy be the way to go? >>>>>>>>>> >>>>>>>> >>>>>>>> --------------------------------------------------------- >>>>>>>> >>>>>>>> >>>>>>>> could you please give me a hint for this one too if not much of an >>>>>>>> effort? >>>>>>>> >>>>>>>> Kind regards, >>>>>>>> Andriana. >>>>>>>> >>>>>>>>> Hi Andriana, >>>>>>>>> >>>>>>>>> The code looks right, and the whole problem seem to be because of >>>>>>>>> a >>>>>>>>> small >>>>>>>>> problem with "connect" implementation in your tracer. The >>>>>>>>> producer >>>>>>>>> application is not "aggregated" (in NS-3 terms) on the node, >>>>>>>>> rather >>>>>>>>> than >>>>>>>>> it is installed on a Node as an application. While it seem the >>>>>>>>> same, >>>>>>>>> it >>>>>>>>> actually requires a slightly different way to connect the trace. >>>>>>>>> The >>>>>>>>> working example is in utils/tracers/ndn-app-delay-tracer.cc:231 >>>>>>>>> and >>>>>>>>> in >>>>>>>>> your case ndn-producer-tracer.cc on line 105 could look something >>>>>>>>> like: >>>>>>>>> >>>>>>>>> Config::ConnectWithoutContext >>>>>>>>> ("/NodeList/"+m_node+"/ApplicationList/*/ServerHits", >>>>>>>>> MakeCallback >>>>>>>>> (&ProducerTracer::ServerHits, this)); >>>>>>>>> >>>>>>>>> Can you try it and if it doesn't fix the problem, I'll try to dig >>>>>>>>> more. >>>>>>>>> >>>>>>>>> --- >>>>>>>>> Alex >>>>>>>>> >>>>>>>>> On Aug 29, 2013, at 1:55 PM, ioannoa at scss.tcd.ie wrote: >>>>>>>>> >>>>>>>>>> Hello all again, >>>>>>>>>> >>>>>>>>>> further to my previous question I have tried to also implement a >>>>>>>>>> metric >>>>>>>>>> in >>>>>>>>>> the producer to hold the hits made each time regarding the >>>>>>>>>> interests, >>>>>>>>>> i.e. >>>>>>>>>> how many interests were satisfied by the producer if not from a >>>>>>>>>> content >>>>>>>>>> store of a node along the way. >>>>>>>>>> >>>>>>>>>> i've tried to use the tracers available and made the included >>>>>>>>>> files. >>>>>>>>>> Unfortunately, even though my file is created, the metric is >>>>>>>>>> always >>>>>>>>>> 0. >>>>>>>>>> Furthermore, having a print in the function updating the metric, >>>>>>>>>> it >>>>>>>>>> seems >>>>>>>>>> that it is never called! The function is set using the >>>>>>>>>> TracedCallback. >>>>>>>>>> >>>>>>>>>> Now, i know that the tracer is made for all nodes and not just >>>>>>>>>> specifying >>>>>>>>>> one, but i have tried this for an operation similar to the cache >>>>>>>>>> misses >>>>>>>>>> or >>>>>>>>>> cache hits at the content store and still did not work, so can't >>>>>>>>>> see >>>>>>>>>> that >>>>>>>>>> as a problem. >>>>>>>>>> >>>>>>>>>> I have included the files. If someone has a hint, please let me >>>>>>>>>> know! >>>>>>>>>> >>>>>>>>>> p.s. the changes in the producer files can be found using //(+) >>>>>>>>>> in >>>>>>>>>> the >>>>>>>>>> finder! >>>>>>>>>> >>>>>>>>>> Kind regards, >>>>>>>>>> Andriana. >>>>>>>>>> >>>>>>>>>> ---------------------------- Original Message >>>>>>>>>> ---------------------------- >>>>>>>>>> Subject: Replacement metric >>>>>>>>>> From: ioannoa at scss.tcd.ie >>>>>>>>>> Date: Thu, August 29, 2013 11:07 am >>>>>>>>>> To: ndnsim at lists.cs.ucla.edu >>>>>>>>>> -------------------------------------------------------------------------- >>>>>>>>>> >>>>>>>>>> Hello all, >>>>>>>>>> >>>>>>>>>> I am trying to implement a replacement metric, similar to the >>>>>>>>>> one >>>>>>>>>> used >>>>>>>>>> for >>>>>>>>>> cache hits and cache misses in content store. My issue is though >>>>>>>>>> that >>>>>>>>>> replacement counts are not calculated in the content store but >>>>>>>>>> rather >>>>>>>>>> to >>>>>>>>>> each replacement policy used. Would someone advice which way >>>>>>>>>> would >>>>>>>>>> be >>>>>>>>>> proper to try to do so? I have found this post related to: >>>>>>>>>> http://www.lists.cs.ucla.edu/pipermail/ndnsim/2012-December/000007.html >>>>>>>>>> would the creation of a new policy be the way to go? >>>>>>>>>> >>>>>>>>>> Thanks in advance. >>>>>>>>>> >>>>>>>>>> Kind regards, >>>>>>>>>> Andriana._______________________________________________ >>>>>>>>>> ndnSIM mailing list >>>>>>>>>> ndnSIM at lists.cs.ucla.edu >>>>>>>>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > -------------- next part -------------- A non-text attachment was scrubbed... Name: content-store-impl.h Type: application/octet-stream Size: 11175 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fifo-policy.h Type: application/octet-stream Size: 4026 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: lfu-policy.h Type: application/octet-stream Size: 5415 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: lru-policy.h Type: application/octet-stream Size: 4463 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: random-policy.h Type: application/octet-stream Size: 5663 bytes Desc: not available URL: From alexander.afanasyev at ucla.edu Wed Sep 4 13:00:18 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Wed, 4 Sep 2013 13:00:18 -0700 Subject: [ndnSIM] Packet-level trace In-Reply-To: <4982b679.25a74.140e8021d66.Coremail.blindeafer@163.com> References: <4982b679.25a74.140e8021d66.Coremail.blindeafer@163.com> Message-ID: <93F9F8E0-1732-460F-A419-C3F325D54F31@ucla.edu> Hi! "Packets" column is estimated "rate" of the packets, calculated using the exponential weighted moving average algorithm (alpha coefficient is hardcoded to be 0.8). "PacketRaw" column represent the absolute (raw) number of packets that were observed within last averaging period. Depending on what you're evaluating, you may want to look at estimated rate or directly at packet counts. --- Alex On Sep 4, 2013, at 1:06 AM, ??? wrote: > Hi All, > would you please tell me that What is the difference between packets and packetraw in txtfile from L3 rate trace? > > Thank you. > Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Wed Sep 4 17:02:39 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Wed, 4 Sep 2013 17:02:39 -0700 Subject: [ndnSIM] [Fwd: Replacement metric] Done! In-Reply-To: <35935c5f9f046fbe008d6820e96724bd.squirrel@webmail.scss.tcd.ie> References: <78CD9E62-4864-4B1F-9301-53556CEC661C@ucla.edu> <4434CF5F-53CF-4E4F-8065-127585A9CC50@ucla.edu> <4fa786004b335e10657edb61125dc96d.squirrel@webmail.scss.tcd.ie> <29A61F70-854A-474D-B122-D214EDB116C0@ucla.edu> <30BD1A6E-2ED9-4DA2-9B2D-CA9A1EB4B62A@ucla.edu> <3852E355-7396-4554-A82B-914B61E37ACE@ucla.edu> <35935c5f9f046fbe008d6820e96724bd.squirrel@webmail.scss.tcd.ie> Message-ID: <8B5F9B3C-2063-408A-BCC2-600CA5599907@ucla.edu> Hi Andriana, I was actually thinking of a slightly different approach to implement, relying purely on multi-policy class. In this way you don't really need to create any lru/lfu/fifo/random modifications, as well as there is no need to modify Add operation in the content store implementation. Basically, you can chain "probability" policy and actual policy, while keep using the standard Add operation: public ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > > (The ultimate result may be different depending on the order of chaining.) Whenever either of the policies fail to insert item to the cache, Add will fail. The customized version of content store is only needed to provide a way to configure probability using NS-3 attributes. Let me know what do you think. Here is my code: -------------- next part -------------- A non-text attachment was scrubbed... Name: probability-policy.h Type: application/octet-stream Size: 3683 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: content-store-with-probability.cc Type: application/octet-stream Size: 3400 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: content-store-with-probability.h Type: application/octet-stream Size: 3183 bytes Desc: not available URL: -------------- next part -------------- For the scenario, you can specify: ndnHelper.SetContentStore ("ns3::ndn::cs::Probability2::Lru", "MaxSize", "100", "CacheProbability", "0.5"); (or other policies). --- Alex PS I have a big comment about the randomization in NS-3. Do not use system-provided rand() operation! Major thing is that it will not give you a consistent results for the same simulation run (which is expected from the simulation code), as well as you need to do something with srand. NS-3 has an extended list of randomization functions that you can use, for example UniformVariable, if you want uniform distribution. Also, the way you did randomization is not exactly producing true uniform. You can read this article http://www.azillionmonkeys.com/qed/random.html, but you can google others as well. On Sep 4, 2013, at 4:25 PM, ioannoa at scss.tcd.ie wrote: > Hi Alex, > > I actually think that i solved it! So the scenario was that i had a new > implementation of the content store - that caches based on a probability > given through the helper- name content-store-prob-impl.h & > content-store-prob-impl.cc. > > For that i created the below on files: > > lru-prob-policy.h > lfu-prob-policy.h > fifo-prob-policy.h > random-prob-policy.h > > multi-prob-policy.h > multi-prob-policy-container.h > lifetime-stats-prob-policy.h > > content-store-stats-prob.h > content-store-stats-prob.cc > > cs-prob-tracer.h > cs-prob-tracer.cc > > so as to be able to collect the results of the metrics the same way as in > content-store-stats. > > Do not if that is any helpful as further instructions of how the classes > are linked together. Also, I would be happy to provide them/upload them if > that is of any interest to have. > > Please let me know if so. > > Kind regards, > Andriana. > >> Hi Alex, >> >> Indeed i was sth missing. >> >> >> Now, i have an other question. I have implemented a content-store-impl >> class with 2 more functions and also the lru-lfu-fifo-random classes >> having the same functions included. I want though to use the >> content-store-with-stats class so as get my results. >> >> How do i link these all together? I tried to modify the multi-policy class >> to include my functions also but it seems that pit is also using it, so >> shouldn't do that. Is the case that i need to make new content-store-stats >> and new multi-policy and new lifetime-stats classes in order to reach my >> goal? >> >> Thanks in advance. >> >> A. >> >>> Which line it complains exactly? About your "void CacheEntryRemoved >>> (std::string context, Ptr" function or something >>> else? >>> >>> Most likely some include is missing, but I cant yet guess which exactly. >>> >>> --- >>> Alex >>> >>> On Sep 1, 2013, at 12:21 PM, ioannoa at scss.tcd.ie wrote: >>> >>>> Yeah, i did something like that. But, anyway at the very end i thought >>>> that since all approaches are gonna be tested under the same patterns, >>>> it >>>> wouldn't mind so as to compare them. >>>> >>>> Anyway, one other is that i was simply trying to include the lifetime >>>> at >>>> the cs-tracer. A simple simulation example seems to work fine, >>>> >>>> e.g. >>>> >>>> ................................................ >>>> #include >>>> >>>> using namespace ns3; >>>> >>>> void >>>> CacheEntryRemoved (std::string context, Ptr >>>> entry,Time lifetime) >>>> { >>>> std::cout << entry->GetName () << " " << lifetime.ToDouble (Time::S) >>>> << "s" << std::endl; >>>> } >>>> >>>> int >>>> main (int argc, char *argv[]) >>>> { >>>> // setting default parameters for PointToPoint links and channels >>>> ................................................ >>>> // Read optional command-line parameters (e.g., enable visualizer with >>>> ./waf --run=<> --visualize >>>> ................................................ >>>> // Creating nodes >>>> ................................................ >>>> // Connecting nodes using two links >>>> ................................................ >>>> // Install NDN stack on all nodes >>>> ................................................ >>>> ndnHelper.SetContentStore ("ns3::ndn::cs::Stats::Lru", "MaxSize", >>>> "2"); >>>> // (+)//~ >>>> ndnHelper.InstallAll (); >>>> Config::Connect >>>> ("/NodeList/*/$ns3::ndn::cs::Stats::Lru/WillRemoveEntry", >>>> MakeCallback (CacheEntryRemoved));//(+) >>>> >>>> but when i try to put that into the cs-tracer i get an error of : >>>> error: ISO C++ forbids declaration of ?type name? with no type >>>> error: template argument 1 is invalid >>>> >>>> that goes to the string declaration? What is that i am missing here? >>>> >>>> A. >>>> >>>>> Yes. The tracers will do that and it was done semi-intentionally, >>>>> since >>>>> some tracers use time period as a base for averaging and doing such >>>>> averaging could be problematic (or even impossible) in some cases. >>>>> >>>>> The trick that I was using in my simulations is just to set simulation >>>>> time a little bit longer. Like not 2 seconds exactly, but 2 seconds + >>>>> 1 >>>>> nanosecond or something. This way the tracer print event will be >>>>> properly >>>>> executed. >>>>> >>>>> Would this work for you? >>>>> >>>>> --- >>>>> Alex >>>>> >>>>> On Aug 31, 2013, at 6:41 AM, ioannoa at scss.tcd.ie wrote: >>>>> >>>>>> Hey Alex, >>>>>> >>>>>> just a quick question that i just now realized. >>>>>> >>>>>> Is the case in all the tracers that do not actually present the >>>>>> latest >>>>>> measurements calculated. e.g. picking a time interval of 1.0 sec for >>>>>> my >>>>>> tracers and putting my simulation time also to 1.0 i get no outputs >>>>>> for >>>>>> all actually the tracers except the app-delays one. >>>>>> >>>>>> For example I used an experiment of 2.0 seconds with sending up to 10 >>>>>> interest in each sec. so i am getting 20 prints that an interest >>>>>> reached >>>>>> the producer application (i print in the OnInterest of the producer >>>>>> app). >>>>>> However, the tracer gives me up to 10 when i use a time interval of >>>>>> 1.0 >>>>>> sec and up to 15 when i use an interval of 0.5 sec. I should get my >>>>>> 20 >>>>>> but >>>>>> i suspect that i don't cause the simulation ends first! Is there a >>>>>> way >>>>>> i >>>>>> can actually get the final results too? >>>>>> >>>>>> >>>>>> Andriana. >>>>>> >>>>>>> Got it. I think you can either use directly or with some >>>>>>> modification >>>>>>> ContentStoreWithStats (model/cs/content-store-with-stats.h|cc and >>>>>>> model/cs/custom-policies/lifetime-stats-policy.h) >>>>>>> >>>>>>> Basically, "policy" can be bundled list of several different >>>>>>> policies >>>>>>> (I >>>>>>> called it multi-policy). In this particular case, I'm bundling >>>>>>> lifetime-stats-policy with any other policy available (if you're >>>>>>> working >>>>>>> on you own, you just need to instantiate it, see .cc file). >>>>>>> >>>>>>> I hope the code is not too confusing :) >>>>>>> >>>>>>> --- >>>>>>> Alex >>>>>>> >>>>>>> On Aug 30, 2013, at 2:51 PM, ioannoa at scss.tcd.ie wrote: >>>>>>> >>>>>>>> Hi Alex, >>>>>>>> >>>>>>>> no worries. You should have like loads in mind from people sending >>>>>>>> over. >>>>>>>> >>>>>>>> What i want to count is the number of replacements that happen in >>>>>>>> each >>>>>>>> content store of each ndn node. Cache misses and cache hits can be >>>>>>>> calculated in the content store but content store does not know >>>>>>>> when >>>>>>>> a >>>>>>>> replacement of a content is made in the content store when the Add >>>>>>>> function is called. The Add function makes use of the insert >>>>>>>> function >>>>>>>> of >>>>>>>> the trie class (lru, lfu, fifo, random ) depending on the policy. >>>>>>>> So, >>>>>>>> I >>>>>>>> would like to calculate that, though not be restricted by one >>>>>>>> policy >>>>>>>> only. >>>>>>>> >>>>>>>> >>>>>>>> So, sth like this in the lru policy (but ideally not restricted by >>>>>>>> one >>>>>>>> policy) >>>>>>>> >>>>>>>> inline bool >>>>>>>> insert (typename parent_trie::iterator item) >>>>>>>> { >>>>>>>> std::cout << "This is Lru class!" << std::endl; >>>>>>>> >>>>>>>> if (max_size_ != 0 && policy_container::size () >= max_size_) >>>>>>>> { >>>>>>>> base_.erase (&(*policy_container::begin ())); >>>>>>>> >>>>>>>> ----------------------------------------------------------------------------------- >>>>>>>> ---->>>> num_of_replacements = num_of_replacements + 1; >>>>>>>> ----------------------------------------------------------------------------------- >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> policy_container::push_back (*item); >>>>>>>> return true; >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> Did that make any sense? >>>>>>>> >>>>>>>> Kind regards, >>>>>>>> Andriana. >>>>>>>> >>>>>>>> >>>>>>>>> Oh sorry. Forgot to reply on that. I'm actually a little bit >>>>>>>>> confused >>>>>>>>> on >>>>>>>>> what exactly is your objective and what is the problem. >>>>>>>>> "CacheHits" >>>>>>>>> and >>>>>>>>> "CacheMisses" are traces that available for any content store with >>>>>>>>> any >>>>>>>>> cache policy and ndn::CsTracer can be used to get the data. Are >>>>>>>>> you >>>>>>>>> referring to something else? >>>>>>>>> >>>>>>>>> --- >>>>>>>>> Alex >>>>>>>>> >>>>>>>>> On Aug 30, 2013, at 11:20 AM, ioannoa at scss.tcd.ie wrote: >>>>>>>>> >>>>>>>>>> Hello Alex, >>>>>>>>>> >>>>>>>>>> Many thanks for the reply. >>>>>>>>>> >>>>>>>>>> The one seems to work fine. I thought it was for getting the id >>>>>>>>>> of >>>>>>>>>> each >>>>>>>>>> application, so did not count it as a factor. >>>>>>>>>> >>>>>>>>>> I actually posted an other question before this, >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------- >>>>>>>>>> >>>>>>>>>>>> I am trying to implement a replacement metric, similar to the >>>>>>>>>>>> one >>>>>>>>>>>> used >>>>>>>>>>>> for >>>>>>>>>>>> cache hits and cache misses in content store. My issue is >>>>>>>>>>>> though >>>>>>>>>>>> that >>>>>>>>>>>> replacement counts are not calculated in the content store but >>>>>>>>>>>> rather >>>>>>>>>>>> to >>>>>>>>>>>> each replacement policy used. Would someone advice which way >>>>>>>>>>>> would >>>>>>>>>>>> be >>>>>>>>>>>> proper to try to do so? I have found this post related to: >>>>>>>>>>>> http://www.lists.cs.ucla.edu/pipermail/ndnsim/2012-December/000007.html >>>>>>>>>>>> would the creation of a new policy be the way to go? >>>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> could you please give me a hint for this one too if not much of >>>>>>>>>> an >>>>>>>>>> effort? >>>>>>>>>> >>>>>>>>>> Kind regards, >>>>>>>>>> Andriana. >>>>>>>>>> >>>>>>>>>>> Hi Andriana, >>>>>>>>>>> >>>>>>>>>>> The code looks right, and the whole problem seem to be because >>>>>>>>>>> of >>>>>>>>>>> a >>>>>>>>>>> small >>>>>>>>>>> problem with "connect" implementation in your tracer. The >>>>>>>>>>> producer >>>>>>>>>>> application is not "aggregated" (in NS-3 terms) on the node, >>>>>>>>>>> rather >>>>>>>>>>> than >>>>>>>>>>> it is installed on a Node as an application. While it seem the >>>>>>>>>>> same, >>>>>>>>>>> it >>>>>>>>>>> actually requires a slightly different way to connect the trace. >>>>>>>>>>> The >>>>>>>>>>> working example is in utils/tracers/ndn-app-delay-tracer.cc:231 >>>>>>>>>>> and >>>>>>>>>>> in >>>>>>>>>>> your case ndn-producer-tracer.cc on line 105 could look >>>>>>>>>>> something >>>>>>>>>>> like: >>>>>>>>>>> >>>>>>>>>>> Config::ConnectWithoutContext >>>>>>>>>>> ("/NodeList/"+m_node+"/ApplicationList/*/ServerHits", >>>>>>>>>>> MakeCallback >>>>>>>>>>> (&ProducerTracer::ServerHits, this)); >>>>>>>>>>> >>>>>>>>>>> Can you try it and if it doesn't fix the problem, I'll try to >>>>>>>>>>> dig >>>>>>>>>>> more. >>>>>>>>>>> >>>>>>>>>>> --- >>>>>>>>>>> Alex >>>>>>>>>>> >>>>>>>>>>> On Aug 29, 2013, at 1:55 PM, ioannoa at scss.tcd.ie wrote: >>>>>>>>>>> >>>>>>>>>>>> Hello all again, >>>>>>>>>>>> >>>>>>>>>>>> further to my previous question I have tried to also implement >>>>>>>>>>>> a >>>>>>>>>>>> metric >>>>>>>>>>>> in >>>>>>>>>>>> the producer to hold the hits made each time regarding the >>>>>>>>>>>> interests, >>>>>>>>>>>> i.e. >>>>>>>>>>>> how many interests were satisfied by the producer if not from a >>>>>>>>>>>> content >>>>>>>>>>>> store of a node along the way. >>>>>>>>>>>> >>>>>>>>>>>> i've tried to use the tracers available and made the included >>>>>>>>>>>> files. >>>>>>>>>>>> Unfortunately, even though my file is created, the metric is >>>>>>>>>>>> always >>>>>>>>>>>> 0. >>>>>>>>>>>> Furthermore, having a print in the function updating the >>>>>>>>>>>> metric, >>>>>>>>>>>> it >>>>>>>>>>>> seems >>>>>>>>>>>> that it is never called! The function is set using the >>>>>>>>>>>> TracedCallback. >>>>>>>>>>>> >>>>>>>>>>>> Now, i know that the tracer is made for all nodes and not just >>>>>>>>>>>> specifying >>>>>>>>>>>> one, but i have tried this for an operation similar to the >>>>>>>>>>>> cache >>>>>>>>>>>> misses >>>>>>>>>>>> or >>>>>>>>>>>> cache hits at the content store and still did not work, so >>>>>>>>>>>> can't >>>>>>>>>>>> see >>>>>>>>>>>> that >>>>>>>>>>>> as a problem. >>>>>>>>>>>> >>>>>>>>>>>> I have included the files. If someone has a hint, please let me >>>>>>>>>>>> know! >>>>>>>>>>>> >>>>>>>>>>>> p.s. the changes in the producer files can be found using //(+) >>>>>>>>>>>> in >>>>>>>>>>>> the >>>>>>>>>>>> finder! >>>>>>>>>>>> >>>>>>>>>>>> Kind regards, >>>>>>>>>>>> Andriana. >>>>>>>>>>>> >>>>>>>>>>>> ---------------------------- Original Message >>>>>>>>>>>> ---------------------------- >>>>>>>>>>>> Subject: Replacement metric >>>>>>>>>>>> From: ioannoa at scss.tcd.ie >>>>>>>>>>>> Date: Thu, August 29, 2013 11:07 am >>>>>>>>>>>> To: ndnsim at lists.cs.ucla.edu >>>>>>>>>>>> -------------------------------------------------------------------------- >>>>>>>>>>>> >>>>>>>>>>>> Hello all, >>>>>>>>>>>> >>>>>>>>>>>> I am trying to implement a replacement metric, similar to the >>>>>>>>>>>> one >>>>>>>>>>>> used >>>>>>>>>>>> for >>>>>>>>>>>> cache hits and cache misses in content store. My issue is >>>>>>>>>>>> though >>>>>>>>>>>> that >>>>>>>>>>>> replacement counts are not calculated in the content store but >>>>>>>>>>>> rather >>>>>>>>>>>> to >>>>>>>>>>>> each replacement policy used. Would someone advice which way >>>>>>>>>>>> would >>>>>>>>>>>> be >>>>>>>>>>>> proper to try to do so? I have found this post related to: >>>>>>>>>>>> http://www.lists.cs.ucla.edu/pipermail/ndnsim/2012-December/000007.html >>>>>>>>>>>> would the creation of a new policy be the way to go? >>>>>>>>>>>> >>>>>>>>>>>> Thanks in advance. >>>>>>>>>>>> >>>>>>>>>>>> Kind regards, >>>>>>>>>>>> Andriana._______________________________________________ >>>>>>>>>>>> ndnSIM mailing list >>>>>>>>>>>> ndnSIM at lists.cs.ucla.edu >>>>>>>>>>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> > > From ndnsim_beginner at 163.com Thu Sep 5 00:01:55 2013 From: ndnsim_beginner at 163.com (ndnSIM_beginner) Date: Thu, 5 Sep 2013 15:01:55 +0800 (CST) Subject: [ndnSIM] a question Message-ID: <26f9dbb6.eb7b.140eced6306.Coremail.ndnsim_beginner@163.com> Hello Alex,Hello,I am a beginner and my English is not good, I want to achieve a set of node cooperative store.It means that if a node want to store a content,it will send packets to its neighbor nodes.if the content in the neighbor nodes,the node can't store the content. But I don't know how to get around the node interface now.Please give some advice. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.siit at gmail.com Thu Sep 5 06:35:04 2013 From: james.siit at gmail.com (James A A) Date: Thu, 5 Sep 2013 21:35:04 +0800 Subject: [ndnSIM] PIT Entry implementation in ndnSIM Message-ID: Hi Alex, I looked at how PIT entry is implemented in ndnSIM. I observed that the lifetime of a PIT entry for a given interest is updated every time subsequent interests for the same data arrive at a node (router) before the entry lifetime expires. The node is still waiting to receive the data. I obtained this information, in addition to other sources, from simulation run on ndnSIM when I used NS_LOG=ndn.pit.Entry. Please clarify this. Is ndnSIM based on CCNx documentation? If yes, please see https://www.ccnx.org/releases/ccnx-0.8.0/doc/technical/CCNxProtocol.htmlunder CCNx Node Model ==> Pending Interest Table (PIT), and Strategy Rules ==> 2nd paragraph. Regards, James -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarantarnoi at gmail.com Thu Sep 5 19:54:43 2013 From: sarantarnoi at gmail.com (Saran Tarnoi) Date: Fri, 6 Sep 2013 11:54:43 +0900 Subject: [ndnSIM] [Fwd: Replacement metric] Done! Message-ID: Dear Alex, It's great to have the ability to cache data packet based on a designated probability. Could you please push your codes to some branches so that I can test some scenarios? Thank you so much. -- Regards, Saran Tarnoi -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Thu Sep 5 20:51:13 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 5 Sep 2013 20:51:13 -0700 Subject: [ndnSIM] [Fwd: Replacement metric] Done! In-Reply-To: References: Message-ID: <36EFF3D0-A987-49C2-A486-8A7331AE22F9@ucla.edu> Hi Saran, I have pushed to the master branch, since the change doesn't really affect other code. Let us know your findings. --- Alex On Sep 5, 2013, at 7:54 PM, Saran Tarnoi wrote: > Dear Alex, > > It's great to have the ability to cache data packet based on a designated probability. > Could you please push your codes to some branches so that I can test some scenarios? > Thank you so much. > > -- > Regards, > Saran Tarnoi From alexander.afanasyev at ucla.edu Thu Sep 5 20:53:57 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 5 Sep 2013 20:53:57 -0700 Subject: [ndnSIM] a question In-Reply-To: <26f9dbb6.eb7b.140eced6306.Coremail.ndnsim_beginner@163.com> References: <26f9dbb6.eb7b.140eced6306.Coremail.ndnsim_beginner@163.com> Message-ID: Hi! You can try to check the old thread http://www.lists.cs.ucla.edu/pipermail/ndnsim/2013-March/000238.html, which may be helpful for you to get an idea how to proceed. --- Alex On Sep 5, 2013, at 12:01 AM, ndnSIM_beginner wrote: > Hello Alex, > Hello,I am a beginner and my English is not good, > I want to achieve a set of node cooperative store.It means that if a node want to store a content,it will send packets to its neighbor nodes.if the content in the neighbor nodes,the node can't store the content. > But I don't know how to get around the node interface now.Please give some advic! e. > Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Thu Sep 5 21:01:43 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 5 Sep 2013 21:01:43 -0700 Subject: [ndnSIM] RTT tag In-Reply-To: <683b32db.3dab.140ebd66980.Coremail.blindeafer@163.com> References: <67956969.1d4ca.140df39c2f4.Coremail.blindeafer@163.com> <527F9861-899C-468E-AEA6-70D1B19C1927@ucla.edu> <4d538ffe.1210.140e1654a01.Coremail.blindeafer@163.com> <799EA7F5-2004-4FF2-8DCE-A12E9837B610@ucla.edu> <683b32db.3dab.140ebd66980.Coremail.blindeafer@163.com> Message-ID: <67815353-7200-4D5C-9F8A-790500A4A874@ucla.edu> I think what you're describing is not RTT, but something like propagation delay from the producer/cache. To access tags, you can always use PeekPacketTag to get a copy of the tag, or RemovePacketTag to get tag and remove it (i.e., you want to use this if you want to update the tag/value of the tag). As for OnData. I think the best place is to put it after the line 256 in fw/ndn-forwarding-strategy.cc, just add the condition on `cached' variable, which indicate whether Data was cached or not, as determined by your policy/implementation. --- Alex On Sep 4, 2013, at 6:57 PM, ??? wrote: > I am sorry for my expression,I make an example: > (A)- - - - - -(B)- - - - - -(C)- - - - - -(D) > there are four nodes, A is consumer, D is producer,B and C are routers.If A send out an interest to request a content M,and D satisfies the interest.M will pass C and B to A.The tag is created and initialized to 0 at producer. > If node C decide to cache M and store it successfully,it will update the value of tag with the RTT of M.And node B will consult the value to decide whether to cache M.If node B cache M successfully, the value of tag will be update with the RTT at node B.So the value of the tag always record the latest RTT the lastest time content is cached. > In my cache policy, node will consult the value of tag to decide whether to cache the content incoming, and will update the value if the content is successfully cached at this node. > So I wuold like to know how to get the value of the tag in OnData() function and how to insert the value updated into packet before it is send to downstream node to satisfy interests. > > Thank you. > > > > > At 2013-09-05 04:05:40,"Alex Afanasyev" wrote: > I'm really sorry, but I'm still confused. Did you check how FwHopCount tag is implemented? Is it something similar to what you want, but just different metric? > > Also, why do you want to put RTT metric into the packet, as you client (who generated interest) can always know when it send out Interest packet and after Data packet is received it can calculate RTT for the Interest/Data pair. Actually, there is already implementation and TraceHelper for that functionality: http://ndnsim.net/metric.html#application-level-trace-helper > > --- > Alex > > On Sep 2, 2013, at 6:17 PM, ??? wrote: > >> I add the RTT tag to data packet,it is created and initialized to 0 at producer.cc. >> 1.When a data packet arrive at a node,I can get the interval R from the time the coresponding interest was send.If the node decide to cache the data packet,and before the data packet was send to satisfy interests in PIT, the node will update the tag with the inteval R. >> >> 2.when a node get a data packet, it will get the value of the RTT tag. >> >> I don't know how to get the value from data packet and how to add the updated tag to data packet before it is send to satisfy interests. >> >> >> >> >> >> At 2013-09-03 01:06:16,"Alex Afanasyev" wrote: >> Can you clarify a little bit more on what is your exact problem... I'm a little bit confused. >> >> -- >> Alex >> >> On Sep 2, 2013, at 8:10 AM, ??? wrote: >> >>> Hi Alex, >>> I create a new tag to record RTT and add it to content packet.It is initialized to 0 by producer. If the node cache the content, it will update the value of the tag with RTT(Simulator::Now() - sendtime),the sendtime = pitEntry->GetOutgoing ().find (inFace)->m_sendTime. >>> I create the tag class with Update() function and Get() function to get the value. How to add the tag to origPacket after it is updated before SatisfyPendingInterest (inFace, header, payload, origPacket, pitEntry) in OnData(),and get the value from origPacket in the OnData(),could you give me some hint? >>> >>> Regards. >>> >>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Thu Sep 5 21:12:22 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 5 Sep 2013 21:12:22 -0700 Subject: [ndnSIM] PIT Entry implementation in ndnSIM In-Reply-To: References: Message-ID: Hi James, I'm not quite sure what exactly you're referring in the second second paragraph of ccnx. First of all, PIT entry's lifetime is updated (suppose to be updated) in ndnSIM and it does not contradict from what I read in the linked doc. Second, CCNx protocol specification is just one interpretation of what Named Data Networking is or should be. The whole purpose of the ndnSIM is to understand the architecture itself, to play with different parameters, etc., including PIT entry lifetime. --- Alex On Sep 5, 2013, at 6:35 AM, James A A wrote: > Hi Alex, > > I looked at how PIT entry is implemented in ndnSIM. I observed that the lifetime of a PIT entry for a given interest is updated every time subsequent interests for the same data arrive at a node (router) before the entry lifetime expires. The node is still waiting to receive the data. I obtained this information, in addition to other sources, from simulation run on ndnSIM when I used NS_LOG=ndn.pit.Entry. Please clarify this. > > Is ndnSIM based on CCNx documentation? If yes, please see https://www.ccnx.org/releases/ccnx-0.8.0/doc/technical/CCNxProtocol.html under CCNx Node Model ==> Pending Interest Table (PIT), and Strategy Rules ==> 2nd paragraph. > > Regards, > James -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioannoa at scss.tcd.ie Fri Sep 6 03:16:59 2013 From: ioannoa at scss.tcd.ie (ioannoa at scss.tcd.ie) Date: Fri, 6 Sep 2013 11:16:59 +0100 Subject: [ndnSIM] metrics! Message-ID: <90ab91b2fdfcc8229200a7876a7de26e.squirrel@webmail.scss.tcd.ie> Hello all, I am trying to get some results out of my simulations but most of them seem to be just 0! The simulation topology i've used is a 5-level binary tree with the leaf nodes sending requests. An object requests may result into 10^4 interest requests send. I have this example for either requesting one object, either requesting 10 random objects from a 100 object pool. My examples seem to work correct for e.g. the simple example provided with my metrics correctly appearing in the txt files. Could anyone give me a hint of up to how large its simulations did work? Thanks in advance. Andriana. From alexander.afanasyev at ucla.edu Fri Sep 6 10:49:39 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Fri, 6 Sep 2013 10:49:39 -0700 Subject: [ndnSIM] CS,FIB,PIT don't make sense In-Reply-To: <210c241.1f619.140f20f0394.Coremail.wsjie_happy@163.com> References: <48153ac0.1b3cc.14085b81395.Coremail.wsjie_happy@163.com> <1f581d9b.17a80.140f0e2b037.Coremail.wsjie_happy@163.com> <78312C36-B4F6-4E0D-99FA-98CC58EC6876@ucla.edu> <210c241.1f619.140f20f0394.Coremail.wsjie_happy@163.com> Message-ID: Hi Shaojie, The specified prefix "/prefix" for the ConsumerCbr doesn't mean that the application will be requesting the same thing over and over again. In fact, it will be requesting unique pieces of data, /prefix/%00, /prefix/%00%01, /prefix/%00%02, etc., none of them can benefit from caching. If you want see some cache performance, you need to use several ConsumerCbr's or use different consumer, such as ConsumerZipfMandelbrot, which generates requests for data within predefined set. --- Alex On Sep 5, 2013, at 11:56 PM, ??? wrote: > In my simulation (in fact it is just the example ndn-grid.cc), there is only one consumer (using the ns3::ndn::ConsumerCbr) and one producer (using the ns3::ndn::Producer), and every time it just requests the same Data named "/prefix". > > > Shaojie.Wang > > > > > > At 2013-09-06 11:49:46,"Alex Afanasyev" wrote: > The basic question is which consumer you're using. Consumer* applications request different Data packets, unless you doing some thing else. > > --- > Alex > > On Sep 5, 2013, at 6:28 PM, ??? wrote: > >>> Hi Alex, >>> >>> Here comes up a new problem, and I need your help. In my simple simulation with NDN, I just want to test the CS, FIB, PIT. But after I set all these attributes using SetConternStore(), SetForwardingStrategy(), SetPit(), they didn't make sense. Every time the consumer sent a request, it will go to the producer, and then return a response. I think there must be something wrong, but still I find it out. Would you please help me? Thank you! >>> >>> >>> Yours sincerely, >>> >>> Shaojie.Wang >>> >>> Beijing China -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Fri Sep 6 10:56:08 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Fri, 6 Sep 2013 10:56:08 -0700 Subject: [ndnSIM] metrics! In-Reply-To: <90ab91b2fdfcc8229200a7876a7de26e.squirrel@webmail.scss.tcd.ie> References: <90ab91b2fdfcc8229200a7876a7de26e.squirrel@webmail.scss.tcd.ie> Message-ID: Hi Andriana, There could be something wrong with FIBs and forwarding strategies. Did you choose BestRoute and calculated FIB using global routing controller? For non-linear topologies, "default" route and flooding may give unpredictable results. As for the topology size, I was running successfully 4-level binary tree (https://github.com/cawka/ndnSIM-ddos-interest-flooding/blob/master/topologies/tree.txt) and ~600-node topology based on Rocketfuel ATT topology (https://github.com/cawka/ndnSIM-ddos-interest-flooding/blob/master/topologies/7018.r0.txt). --- Alex On Sep 6, 2013, at 3:16 AM, ioannoa at scss.tcd.ie wrote: > Hello all, > > I am trying to get some results out of my simulations but most of them > seem to be just 0! > > The simulation topology i've used is a 5-level binary tree with the leaf > nodes sending requests. > > An object requests may result into 10^4 interest requests send. I have > this example for either requesting one object, either requesting 10 random > objects from a 100 object pool. > > My examples seem to work correct for e.g. the simple example provided with > my metrics correctly appearing in the txt files. Could anyone give me a > hint of up to how large its simulations did work? > > Thanks in advance. > Andriana. From xuan.liu at mail.umkc.edu Sat Sep 7 18:10:01 2013 From: xuan.liu at mail.umkc.edu (Liu, Xuan (UMKC-Student)) Date: Sun, 8 Sep 2013 01:10:01 +0000 Subject: [ndnSIM] how to set the broadcasting prefix Message-ID: <38004F43C4397144BBB4CB71145581897273601B@BN1PRD0113MB678.prod.exchangelabs.com> Hi Alex, I have a question on how to set the prefix for broadcasting in ndnSIM. For example, my application is generating two types of interest, one type is sent out in broadcasting way, and the other type has a specific prefix. Do I need to create two fib entry at the application level? Or shall I create another face at the application level, and assign the broadcasting prefix to this second face? In your chronoschat simulation, did you use /ndn/broadcasting/ as the prefix for broadcasting? Or did you use same prefix for all participant nodes? Thanks, -- Xuan -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Mon Sep 9 10:25:42 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Mon, 9 Sep 2013 10:25:42 -0700 Subject: [ndnSIM] how to set the broadcasting prefix In-Reply-To: <38004F43C4397144BBB4CB71145581897273601B@BN1PRD0113MB678.prod.exchangelabs.com> References: <38004F43C4397144BBB4CB71145581897273601B@BN1PRD0113MB678.prod.exchangelabs.com> Message-ID: <680413FC-E13B-4AE6-AC0D-A6C0A3F4E21A@ucla.edu> Hi Xuan, As of right now, the type of Interest processing does not depend on specific prefix and is fully defined by the forwarding strategy. If you select Flooding, then for all prefixes that have multiple faces in FIB, you going to have broadcast behavior. In our simulation we actually used this strategy, assuming that chat data is piggybacked along the SyncData. It is relatively simple to enable different processing for different prefixes, but this would involve creating a new strategy, which combines Flooding and BestRoute behaviors, depending on FIB prefix. As a shortcut, you can simply hack the BestRoute strategy for that. --- Alex On Sep 7, 2013, at 6:10 PM, "Liu, Xuan (UMKC-Student)" wrote: > Hi Alex, > > I have a question on how to set the prefix for broadcasting in ndnSIM. For example, my application is generating two types of interest, one type is sent out in broadcasting way, and the other type has a specific prefix. Do I need to create two fib entry at the application level? Or shall I create another face at the application level, and assign the broadcasting prefix to this second face? > > In your chronoschat simulation, did you use /ndn/broadcasting/ as the prefix for broadcasting? Or did you use same prefix for all participant nodes? > > > Thanks, > > -- Xuan -------------- next part -------------- An HTML attachment was scrubbed... URL: From xuan.liu at mail.umkc.edu Mon Sep 9 11:04:39 2013 From: xuan.liu at mail.umkc.edu (Liu, Xuan (UMKC-Student)) Date: Mon, 9 Sep 2013 18:04:39 +0000 Subject: [ndnSIM] how to set the broadcasting prefix In-Reply-To: <680413FC-E13B-4AE6-AC0D-A6C0A3F4E21A@ucla.edu> References: <38004F43C4397144BBB4CB71145581897273601B@BN1PRD0113MB678.prod.exchangelabs.com>, <680413FC-E13B-4AE6-AC0D-A6C0A3F4E21A@ucla.edu> Message-ID: <38004F43C4397144BBB4CB71145581897273762B@BN1PRD0113MB678.prod.exchangelabs.com> Hi Alex, Thank you. What do you mean by "hack BestRoute strategy"? In my code, I tried to create a secondary face for broadcasting, which is assigned a common prefix, for example "ndn/broadcasting", the the default face "m_face" is assigned specific prefix for the content. The node is able to receive the broadcasting interest, and content interest, but when the node tried to send out content, it crashed. I'm not sure where was wrong. Thanks, -- Xuan ________________________________ From: Alexander Afanasyev [cawka1 at gmail.com] on behalf of Alex Afanasyev [alexander.afanasyev at ucla.edu] Sent: Monday, September 09, 2013 12:25 PM To: Liu, Xuan (UMKC-Student) Cc: ndnsim at lists.cs.ucla.edu Subject: Re: [ndnSIM] how to set the broadcasting prefix Hi Xuan, As of right now, the type of Interest processing does not depend on specific prefix and is fully defined by the forwarding strategy. If you select Flooding, then for all prefixes that have multiple faces in FIB, you going to have broadcast behavior. In our simulation we actually used this strategy, assuming that chat data is piggybacked along the SyncData. It is relatively simple to enable different processing for different prefixes, but this would involve creating a new strategy, which combines Flooding and BestRoute behaviors, depending on FIB prefix. As a shortcut, you can simply hack the BestRoute strategy for that. --- Alex On Sep 7, 2013, at 6:10 PM, "Liu, Xuan (UMKC-Student)" > wrote: Hi Alex, I have a question on how to set the prefix for broadcasting in ndnSIM. For example, my application is generating two types of interest, one type is sent out in broadcasting way, and the other type has a specific prefix. Do I need to create two fib entry at the application level? Or shall I create another face at the application level, and assign the broadcasting prefix to this second face? In your chronoschat simulation, did you use /ndn/broadcasting/ as the prefix for broadcasting? Or did you use same prefix for all participant nodes? Thanks, -- Xuan -------------- next part -------------- An HTML attachment was scrubbed... URL: From sarantarnoi at gmail.com Tue Sep 10 07:22:11 2013 From: sarantarnoi at gmail.com (Saran Tarnoi) Date: Tue, 10 Sep 2013 23:22:11 +0900 Subject: [ndnSIM] Question about the inconsistent entry in PIT Message-ID: Dear Alex, I was about to modify ndn-forwarding-strategy.cc and I found an ambiguous thing. In ForwardingStrategy::OnData (from line 224,) you put some line of codes for the case that pitEntry == 0, where Ptr pitEntry = m_pit->Lookup (*data);. I ran simulation in a fixed topology with ZipfMandelbrot consumer app. Therefore, a data packet should always follow the path used by it's interest packet. I found that if I set the frequency of request rate to 1, there was no single time that pitEntry = 0. Everything seemed to work as it should do. In contrast, if the request rate was set to 10 or greater values, pitEntry was sometimes equal to 0 at some nodes. In other words, the considering data packet was logically unsolicited, but in fact there should be a pending interest waiting for that data at this node. I really don't understand the reason behind this case. I have checked the PIT's size of those nodes, it was either 0 or 1, so it did not seem to be the problem of PIT size. I attached my scenario and topology file to this email. If you have some time, please help me explain this. Thanks so much for your help. Regards, Saran Tarnoi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ndn-intersection.cc Type: application/octet-stream Size: 4190 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: topology_intersection Type: application/octet-stream Size: 803 bytes Desc: not available URL: From alexander.afanasyev at ucla.edu Tue Sep 10 10:21:37 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Tue, 10 Sep 2013 10:21:37 -0700 Subject: [ndnSIM] Question about the inconsistent entry in PIT In-Reply-To: References: Message-ID: <7174A992-9092-4FA0-90C9-17217425513B@ucla.edu> Hi Saran, Can you try adding this line interest->SetInterestLifetime (m_interestLifeTime); into apps/ndn-consumer-zipf-mandelbrot.cc after line 184. I have a suspicion that this could be the reason of the strange results (and I really wonder how it was working in the first place without interest lifetime to be set in this consumer...) --- Alex On Sep 10, 2013, at 7:22 AM, Saran Tarnoi wrote: > Dear Alex, > > I was about to modify ndn-forwarding-strategy.cc and I found an ambiguous thing. > > In > ForwardingStrategy::OnData (from line 224,) > you put some line of codes for the case that pitEntry == 0, > where Ptr pitEntry = m_pit->Lookup (*data);. > > I ran simulation in a fixed topology with ZipfMandelbrot consumer app. > Therefore, a data packet should always follow the path used by it's interest packet. > > I found that if I set the frequency of request rate to 1, there was no single time that pitEntry = 0. Everything seemed to work as it should do. > > In contrast, if the request rate was set to 10 or greater values, pitEntry was sometimes equal to 0 at some nodes. > In other words, the considering data packet was logically unsolicited, but in fact there should be a pending interest waiting for that data at this node. > > I really don't understand the reason behind this case. > I have checked the PIT's size of those nodes, it was either 0 or 1, so it did not seem to be the problem of PIT size. > I attached my scenario and topology file to this email. > If you have some time, please help me explain this. > > Thanks so much for your help. > > Regards, > Saran Tarnoi > > From alexander.afanasyev at ucla.edu Tue Sep 10 10:25:37 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Tue, 10 Sep 2013 10:25:37 -0700 Subject: [ndnSIM] a question In-Reply-To: <6c2c46b.201f9.141059a97af.Coremail.ndnsim_beginner@163.com> References: <26f9dbb6.eb7b.140eced6306.Coremail.ndnsim_beginner@163.com> <6c2c46b.201f9.141059a97af.Coremail.ndnsim_beginner@163.com> Message-ID: Hi Wang, From the channel you can get pointer to NetDevice (channel->GetDevice(x)). Using netdevice pointer you can get pointer to the face, using GetFaceByNetDevice method from ndn::L3Protocol (http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_l3_protocol.html#ad85486f42dff1d171f59af519079615f) --- Alex On Sep 9, 2013, at 7:01 PM, ndnSIM_beginner wrote: > Hi Alex > Thank you very much! > I have read the advice you gave me .It gives me a lot of inspiration. > I have known how to get devices through nodes ,and how to get channels through devices. > By the way,how can I get Faces through channel. > Thank you in advance. > Wang > > > > > > At 2013-09-06 11:53:57,"Alex Afanasyev" wrote: > Hi! > > You can try to check the old thread http://www.lists.cs.ucla.edu/pipermail/ndnsim/2013-March/000238.html, which may be helpful for you to get an idea how to proceed. > > --- > Alex > > On Sep 5, 2013, at 12:01 AM, ndnSIM_beginner wrote: > >> Hello Alex, >> Hello,I am a beginner and my English is not good, >> I want to achieve a set of node cooperative store.It means that if a node want to store a content,it will send packets to its neighbor nodes.if the content in the neighbor nodes,the node can't store the content. >> But I don't know how to get around the node interface now.Please give some advic! e. >> Thanks in advance > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Tue Sep 10 10:30:33 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Tue, 10 Sep 2013 10:30:33 -0700 Subject: [ndnSIM] how to set the broadcasting prefix In-Reply-To: <38004F43C4397144BBB4CB71145581897273762B@BN1PRD0113MB678.prod.exchangelabs.com> References: <38004F43C4397144BBB4CB71145581897273601B@BN1PRD0113MB678.prod.exchangelabs.com>, <680413FC-E13B-4AE6-AC0D-A6C0A3F4E21A@ucla.edu> <38004F43C4397144BBB4CB71145581897273762B@BN1PRD0113MB678.prod.exchangelabs.com> Message-ID: Hi Xuan, What I meant is to modify implementation of DoPropagateInterest method in model/fw/best-route.cc. Instead of always following the same logic for all prefixes, you can check if pitEntry->GetFibEntry ()->GetPrefix () == ndn::Name("/ndn/broadcast"), and if so forward interest to all faces for the fib entry, instead of just "the best" one. I'm not quite sure what exactly you did, it could help if you could show an example. But I tend to think that the behavior you want should be part of the strategy layer, not the application (I'm guessing that you add the secondary face into the application..., could be wrong). --- Alex On Sep 9, 2013, at 11:04 AM, "Liu, Xuan (UMKC-Student)" wrote: > Hi Alex, > > Thank you. What do you mean by "hack BestRoute strategy"? > > In my code, I tried to create a secondary face for broadcasting, which is assigned a common prefix, for example "ndn/broadcasting", the the default face "m_face" is assigned specific prefix for the content. The node is able to receive the broadcasting interest, and content interest, but when the node tried to send out content, it crashed. I'm not sure where was wrong. > > Thanks, > > -- Xuan > > > From: Alexander Afanasyev [cawka1 at gmail.com] on behalf of Alex Afanasyev [alexander.afanasyev at ucla.edu] > Sent: Monday, September 09, 2013 12:25 PM > To: Liu, Xuan (UMKC-Student) > Cc: ndnsim at lists.cs.ucla.edu > Subject: Re: [ndnSIM] how to set the broadcasting prefix > > Hi Xuan, > > As of right now, the type of Interest processing does not depend on specific prefix and is fully defined by the forwarding strategy. If you select Flooding, then for all prefixes that have multiple faces in FIB, you going to have broadcast behavior. In our simulation we actually used this strategy, assuming that chat data is piggybacked along the SyncData. > > It is relatively simple to enable different processing for different prefixes, but this would involve creating a new strategy, which combines Flooding and BestRoute behaviors, depending on FIB prefix. As a shortcut, you can simply hack the BestRoute strategy for that. > > --- > Alex > > On Sep 7, 2013, at 6:10 PM, "Liu, Xuan (UMKC-Student)" wrote: > >> Hi Alex, >> >> I have a question on how to set the prefix for broadcasting in ndnSIM. For example, my application is generating two types of interest, one type is sent out in broadcasting way, and the other type has a specific prefix. Do I need to create two fib entry at the application level? Or shall I create another face at the application level, and assign the broadcasting prefix to this second face? >> >> In your chronoschat simulation, did you use /ndn/broadcasting/ as the prefix for broadcasting? Or did you use same prefix for all participant nodes? >> >> >> Thanks, >> >> -- Xuan -------------- next part -------------- An HTML attachment was scrubbed... URL: From xuan.liu at mail.umkc.edu Tue Sep 10 12:10:59 2013 From: xuan.liu at mail.umkc.edu (Liu, Xuan (UMKC-Student)) Date: Tue, 10 Sep 2013 19:10:59 +0000 Subject: [ndnSIM] how to set the broadcasting prefix In-Reply-To: References: <38004F43C4397144BBB4CB71145581897273601B@BN1PRD0113MB678.prod.exchangelabs.com>, <680413FC-E13B-4AE6-AC0D-A6C0A3F4E21A@ucla.edu> <38004F43C4397144BBB4CB71145581897273762B@BN1PRD0113MB678.prod.exchangelabs.com>, Message-ID: <38004F43C4397144BBB4CB711455818972737CA6@BN1PRD0113MB678.prod.exchangelabs.com> Hi Alex, Thank you for the reply. You are correct. What I did was create a secondary face into the application, and maybe it's not the correct way to do so.. I checked the original ndn::app and added the secondary face exactly the same way. I will check the way you suggested. void p2pChatApp::StartApplication () { NS_LOG_FUNCTION_NOARGS(); NS_ASSERT(GetNode()->GetObject()!=0); // initialize ndn::App ndn::App::StartApplication (); // create new face // step 1. Create a face m_bcface = CreateObject(this); // step 2. add face to ndn stack GetNode()->GetObject()->AddFace(m_bcface); // step 3. enable face m_bcface->SetUp(true); // Get Node Name Ptr node = GetNode(); m_nodeName = Names::FindName(node); NS_LOG_DEBUG("This node's name is "< fib = GetNode ()->GetObject (); // Add application prefix to the fib Ptr fibEntry = fib->Add (m_nodePrefix, m_face, 0); // Add broadcasting prefix to the fib Ptr fibEntry2 = fib->Add (m_broadcastPrefix, m_bcface, 0); fibEntry->UpdateStatus (m_face, ndn::fib::FaceMetric::NDN_FIB_GREEN); fibEntry2->UpdateStatus (m_bcface, ndn::fib::FaceMetric::NDN_FIB_GREEN); ScheduleNextContent(); ScheduleNextSyncInterest(); } The node can get broadcast interests, and send point to point interest as well. However, when the nodes tried to send out the content respect to some incoming interest (not the broadcast one), it got stuck... Please note that I'm using the old version of ndnSIM.. // Create packet and add header and trailer Ptr packet = Create (1024); packet->AddHeader (contentData); packet->AddTrailer (trailer); NS_LOG_INFO (m_nodeName<<": Sending ContentObject packet for " << contentData.GetName ()); // Forward packet to lower (network) layer m_protocolHandler (packet); // Call trace (for logging purposes) m_transmittedContentObjects (&contentData, packet, this, m_face); Thanks, -- Xuan ________________________________ Xuan Liu PhD Student Graduate Research Assistant Department of Computer Science & Electrical Engineering University of Missouri - Kansas city xuan.liu at mail.umkc.edu ________________________________ From: Alexander Afanasyev [cawka1 at gmail.com] on behalf of Alex Afanasyev [alexander.afanasyev at ucla.edu] Sent: Tuesday, September 10, 2013 12:30 PM To: Liu, Xuan (UMKC-Student) Cc: ndnsim at lists.cs.ucla.edu Subject: Re: [ndnSIM] how to set the broadcasting prefix Hi Xuan, What I meant is to modify implementation of DoPropagateInterest method in model/fw/best-route.cc. Instead of always following the same logic for all prefixes, you can check if pitEntry->GetFibEntry ()->GetPrefix () == ndn::Name("/ndn/broadcast"), and if so forward interest to all faces for the fib entry, instead of just "the best" one. I'm not quite sure what exactly you did, it could help if you could show an example. But I tend to think that the behavior you want should be part of the strategy layer, not the application (I'm guessing that you add the secondary face into the application..., could be wrong). --- Alex On Sep 9, 2013, at 11:04 AM, "Liu, Xuan (UMKC-Student)" > wrote: Hi Alex, Thank you. What do you mean by "hack BestRoute strategy"? In my code, I tried to create a secondary face for broadcasting, which is assigned a common prefix, for example "ndn/broadcasting", the the default face "m_face" is assigned specific prefix for the content. The node is able to receive the broadcasting interest, and content interest, but when the node tried to send out content, it crashed. I'm not sure where was wrong. Thanks, -- Xuan ________________________________ From: Alexander Afanasyev [cawka1 at gmail.com] on behalf of Alex Afanasyev [alexander.afanasyev at ucla.edu] Sent: Monday, September 09, 2013 12:25 PM To: Liu, Xuan (UMKC-Student) Cc: ndnsim at lists.cs.ucla.edu Subject: Re: [ndnSIM] how to set the broadcasting prefix Hi Xuan, As of right now, the type of Interest processing does not depend on specific prefix and is fully defined by the forwarding strategy. If you select Flooding, then for all prefixes that have multiple faces in FIB, you going to have broadcast behavior. In our simulation we actually used this strategy, assuming that chat data is piggybacked along the SyncData. It is relatively simple to enable different processing for different prefixes, but this would involve creating a new strategy, which combines Flooding and BestRoute behaviors, depending on FIB prefix. As a shortcut, you can simply hack the BestRoute strategy for that. --- Alex On Sep 7, 2013, at 6:10 PM, "Liu, Xuan (UMKC-Student)" > wrote: Hi Alex, I have a question on how to set the prefix for broadcasting in ndnSIM. For example, my application is generating two types of interest, one type is sent out in broadcasting way, and the other type has a specific prefix. Do I need to create two fib entry at the application level? Or shall I create another face at the application level, and assign the broadcasting prefix to this second face? In your chronoschat simulation, did you use /ndn/broadcasting/ as the prefix for broadcasting? Or did you use same prefix for all participant nodes? Thanks, -- Xuan -------------- next part -------------- An HTML attachment was scrubbed... URL: From xue_jin at foxmail.com Tue Sep 10 19:17:42 2013 From: xue_jin at foxmail.com (=?ISO-8859-1?B?eHVlamlu?=) Date: Wed, 11 Sep 2013 10:17:42 +0800 Subject: [ndnSIM] A question about the example named "ndn-tree-tracers.cc" Message-ID: Hi Alex, There are two lines code in the example "ndn-tree-tracers.cc" like following : ndn::L3AggregateTracer::InstallAll ("aggregate-trace.txt", Seconds (0.5)); ndn::L3RateTracer::InstallAll ("rate-trace.txt", Seconds (0.5)); When I run the scenario successfully, I get two files named "aggregate-trace.txt" and "rate-trace.txt". Now, I want to change the file names, so I used the next two lines: ndn::L3AggregateTracer::InstallAll ("xuejin-aggregate-trace.txt", Seconds (0.5)); ndn::L3RateTracer::InstallAll ("xuejin-rate-trace.txt", Seconds (0.5)); But after I run it successfully, the files' names still be "aggregate-trace.txt" and "rate-trace.txt". Why names can't change? Looking forward to your response. Jin Xue -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Thu Sep 12 10:35:38 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 12 Sep 2013 10:35:38 -0700 Subject: [ndnSIM] how to set the broadcasting prefix In-Reply-To: <38004F43C4397144BBB4CB711455818972737CA6@BN1PRD0113MB678.prod.exchangelabs.com> References: <38004F43C4397144BBB4CB71145581897273601B@BN1PRD0113MB678.prod.exchangelabs.com>, <680413FC-E13B-4AE6-AC0D-A6C0A3F4E21A@ucla.edu> <38004F43C4397144BBB4CB71145581897273762B@BN1PRD0113MB678.prod.exchangelabs.com>, <38004F43C4397144BBB4CB711455818972737CA6@BN1PRD0113MB678.prod.exchangelabs.com> Message-ID: Hi Xuan Hmmm. Not sure why it was crashing. The whole ndn::App wasn't designed to support more than one face, so there could be something weird happening. In any case, I would hate to suggest that, but in the new release of ndnSIM (>=0.5), it is much easier to write full featured NDN applications. In addition to the existing AppFace, there is a new ApiFace, which allows expressing individual interest and provide callback that will fire when data comes or time out happens, as well as a simple call to "register" prefix. Basically, the same operations as in the real NDN API. However, there would be a lot of changes... For the shortcut I would suggest eliminate the second face, since it doesn't make much sense. Broadcast or not broadcast is not face "decision", but NDN's forwarding strategy. That is, as I suggested before, in the DoPropagateInterest you need to treat p2p and broadcast prefixes differently. --- Alex On Sep 10, 2013, at 12:10 PM, "Liu, Xuan (UMKC-Student)" wrote: > Hi Alex, > > Thank you for the reply. > > You are correct. What I did was create a secondary face into the application, and maybe it's not the correct way to do so.. I checked the original ndn::app and added the secondary face exactly the same way. > > I will check the way you suggested. > > void > p2pChatApp::StartApplication () > { > NS_LOG_FUNCTION_NOARGS(); > NS_ASSERT(GetNode()->GetObject()!=0); > // initialize ndn::App > ndn::App::StartApplication (); > > // create new face > // step 1. Create a face > m_bcface = CreateObject(this); > // step 2. add face to ndn stack > GetNode()->GetObject()->AddFace(m_bcface); > // step 3. enable face > m_bcface->SetUp(true); > > > // Get Node Name > Ptr node = GetNode(); > m_nodeName = Names::FindName(node); > NS_LOG_DEBUG("This node's name is "< InitDigestTree(); // Initialize the digest tree > InitialDigestLog(); // Initialize the digest log > Ptr fib = GetNode ()->GetObject (); > // Add application prefix to the fib > Ptr fibEntry = fib->Add (m_nodePrefix, m_face, 0); > // Add broadcasting prefix to the fib > Ptr fibEntry2 = fib->Add (m_broadcastPrefix, m_bcface, 0); > > fibEntry->UpdateStatus (m_face, ndn::fib::FaceMetric::NDN_FIB_GREEN); > fibEntry2->UpdateStatus (m_bcface, ndn::fib::FaceMetric::NDN_FIB_GREEN); > > ScheduleNextContent(); > ScheduleNextSyncInterest(); > > } > > The node can get broadcast interests, and send point to point interest as well. However, when the nodes tried to send out the content respect to some incoming interest (not the broadcast one), it got stuck... > > Please note that I'm using the old version of ndnSIM.. > > // Create packet and add header and trailer > Ptr packet = Create (1024); > packet->AddHeader (contentData); > packet->AddTrailer (trailer); > > NS_LOG_INFO (m_nodeName<<": Sending ContentObject packet for " << contentData.GetName ()); > > // Forward packet to lower (network) layer > m_protocolHandler (packet); > > // Call trace (for logging purposes) > m_transmittedContentObjects (&contentData, packet, this, m_face); > > > Thanks, > > -- Xuan > > Xuan Liu > > PhD Student > Graduate Research Assistant > Department of Computer Science & Electrical Engineering > University of Missouri - Kansas city > xuan.liu at mail.umkc.edu > > > From: Alexander Afanasyev [cawka1 at gmail.com] on behalf of Alex Afanasyev [alexander.afanasyev at ucla.edu] > Sent: Tuesday, September 10, 2013 12:30 PM > To: Liu, Xuan (UMKC-Student) > Cc: ndnsim at lists.cs.ucla.edu > Subject: Re: [ndnSIM] how to set the broadcasting prefix > > Hi Xuan, > > What I meant is to modify implementation of DoPropagateInterest method in model/fw/best-route.cc. Instead of always following the same logic for all prefixes, you can check if pitEntry->GetFibEntry ()->GetPrefix () == ndn::Name("/ndn/broadcast"), and if so forward interest to all faces for the fib entry, instead of just "the best" one. > > I'm not quite sure what exactly you did, it could help if you could show an example. But I tend to think that the behavior you want should be part of the strategy layer, not the application (I'm guessing that you add the secondary face into the application..., could be wrong). > > --- > Alex > > > On Sep 9, 2013, at 11:04 AM, "Liu, Xuan (UMKC-Student)" wrote: > >> Hi Alex, >> >> Thank you. What do you mean by "hack BestRoute strategy"? >> >> In my code, I tried to create a secondary face for broadcasting, which is assigned a common prefix, for example "ndn/broadcasting", the the default face "m_face" is assigned specific prefix for the content. The node is able to receive the broadcasting interest, and content interest, but when the node tried to send out content, it crashed. I'm not sure where was wrong. >> >> Thanks, >> >> -- Xuan >> >> >> From: Alexander Afanasyev [cawka1 at gmail.com] on behalf of Alex Afanasyev [alexander.afanasyev at ucla.edu] >> Sent: Monday, September 09, 2013 12:25 PM >> To: Liu, Xuan (UMKC-Student) >> Cc: ndnsim at lists.cs.ucla.edu >> Subject: Re: [ndnSIM] how to set the broadcasting prefix >> >> Hi Xuan, >> >> As of right now, the type of Interest processing does not depend on specific prefix and is fully defined by the forwarding strategy. If you select Flooding, then for all prefixes that have multiple faces in FIB, you going to have broadcast behavior. In our simulation we actually used this strategy, assuming that chat data is piggybacked along the SyncData. >> >> It is relatively simple to enable different processing for different prefixes, but this would involve creating a new strategy, which combines Flooding and BestRoute behaviors, depending on FIB prefix. As a shortcut, you can simply hack the BestRoute strategy for that. >> >> --- >> Alex >> >> On Sep 7, 2013, at 6:10 PM, "Liu, Xuan (UMKC-Student)" wrote: >> >>> Hi Alex, >>> >>> I have a question on how to set the prefix for broadcasting in ndnSIM. For example, my application is generating two types of interest, one type is sent out in broadcasting way, and the other type has a specific prefix. Do I need to create two fib entry at the application level? Or shall I create another face at the application level, and assign the broadcasting prefix to this second face? >>> >>> In your chronoschat simulation, did you use /ndn/broadcasting/ as the prefix for broadcasting? Or did you use same prefix for all participant nodes? >>> >>> >>> Thanks, >>> >>> -- Xuan > > _______________________________________________ > 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 alexander.afanasyev at ucla.edu Thu Sep 12 10:48:31 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 12 Sep 2013 10:48:31 -0700 Subject: [ndnSIM] Re: ConsumerBatches In-Reply-To: References: Message-ID: <006A32C1-C55C-407E-9A6F-B837F2A7A092@ucla.edu> Hi Akash, There is no limit for "batches", but the logic implemented inside the ConsumerBatches class may not be exactly what you're expecting. Actually, if you run your simulation long enough (for the modified version of ndn-simple.cc it took ~900 seconds), it will created all the created Interests (5023 to be exact). You can check the current logic for scheduling the Interest in apps/ndn-consumer-batches.cc line 86-96. Basically, the consumer is trying to express only singular Interests, pacing each interest in the batch with the current RTT estimate, to ensure they are not dropped. In other words, there are no surges of Interests at any given point of time. Not sure what logic you want the on-off consumer to have, but you can try to create a new consumer, combining ConsumerCbr and ConsumerBatches classes. --- Alex On Sep 10, 2013, at 1:26 PM, Akash Gearh wrote: > Hello Alexander, > > I ma not able to run ConsumerBatches application for some reason. It doesn't give me the correct number of interests. > > Are there specific limitations to its use? > > For instance, when I use the following line to change the settings (sorry it is a long one since I wanted to create an on-off application using batch process): > consumerHelper.SetAttribute ("Batches", StringValue ("0.1s 5 1.11354s 10 1.18354s 10 1.25354s 10 1.32354s 10 1.39354s 10 1.46354s 4 1.60004s 10 1.67004s 10 1.74004s 10 1.81004s 1 2.95303s 5 3.65195s 10 3.72195s 10 3.79195s 10 3.86195s 10 3.93195s 10 4.00195s 10 4.07195s 10 4.14195s 10 4.21195s 10 4.28195s 10 4.54005s 10 4.61005s 10 4.68005s 10 4.75005s 10 4.82005s 10 4.89005s 5 5.46554s 10 5.53554s 10 5.60554s 10 5.67554s 10 5.74554s 10 5.81554s 3 6.73545s 10 6.80545s 9 7.30789s 10 7.37789s 7 7.57932s 10 7.64932s 10 7.71932s 5 8.61429s 10 8.68429s 10 8.75429s 10 8.82429s 10 8.89429s 10 8.96429s 10 9.03429s 10 9.10429s 10 9.17429s 10 9.24429s 10 9.31429s 10 9.38429s 2 9.7302s 10 9.8002s 4 10.8937s 10 10.9637s 10 11.0337s 10 11.1037s 10 11.1737s 10 11.2437s 10 11.3137s 5 11.5454s 10 11.6154s 10 11.6854s 10 11.7554s 5 12.3517s 10 12.4217s 10 12.4917s 10 12.6053s 10 12.6753s 10 12.9402s 7 13.3354s 10 13.4054s 10 13.4754s 10 13.5454s 10 13.6154s 10 13.6854s 3 13.7673s 10 13.8373s 10 13.9073s 10 13.9773s 4 15.037s 10 15.107s 10 15.177s 10 15.247s 1 16.9706s 10 17.0406s 10 17.1106s 10 17.1806s 10 17.2506s 10 17.3206s 10 17.3906s 10 17.4606s 7 17.6957s 10 17.7657s 10 17.8357s 10 17.9057s 7 18.252s 6 19.7946s 10 19.8646s 10 19.9346s 10 20.0046s 10 20.0746s 10 20.1446s 10 20.2146s 10 20.5757s 10 20.6457s 10 20.7157s 10 20.7857s 1 21.2792s 6 21.4831s 10 21.5531s 10 21.6231s 10 21.6931s 10 21.7631s 10 21.8331s 10 21.9031s 10 21.9731s 8 22.1258s 3 22.9582s 10 23.0282s 2 23.3082s 10 23.3782s 10 23.4482s 10 23.5182s 4 24.9952s 4 26.1097s 10 26.1797s 10 26.2497s 10 26.3197s 10 26.3897s 10 26.4597s 7 26.739s 10 26.809s 10 26.879s 10 26.949s 10 27.019s 10 27.089s 10 27.159s 10 27.229s 10 27.299s 10 27.369s 10 27.439s 10 27.509s 10 27.579s 10 27.649s 1 27.8602s 10 27.9302s 10 28.0002s 10 28.0702s 10 28.1402s 10 28.2102s 10 28.2802s 3 31.5126s 1 32.201s 10 32.271s 10 32.341s 10 32.411s 1 34.0103s 10 34.0803s 10 34.1503s 10 34.2203s 10 34.2903s 3 34.619s 10 34.689s 10 34.759s 10 34.829s 10 34.899s 10 34.969s 10 35.039s 10 35.109s 1 35.3541s 10 35.4241s 10 35.4941s 10 35.5641s 10 35.6341s 10 35.7041s 10 35.7741s 10 35.8441s 10 35.9141s 10 35.9841s 10 36.0541s 10 36.1241s 10 36.1941s 10 36.2641s 10 36.3341s 10 36.4041s 10 36.4741s 2 37.1108s 10 37.1808s 6 37.5563s 10 37.6263s 1 38.6521s 10 38.7221s 10 38.7921s 10 38.8621s 10 38.9321s 10 39.0021s 10 39.0721s 10 39.1421s 10 39.2121s 10 39.2821s 10 39.3521s 10 39.4221s 10 39.4921s 10 39.5621s 10 39.6321s 6 40.1778s 10 40.2478s 10 40.3178s 7 41.5174s 1 41.8731s 8 42.3696s 10 42.4396s 10 42.5096s 10 42.5796s 10 42.6496s 4 43.4612s 10 43.5312s 10 43.7421s 10 43.8121s 10 43.9736s 10 44.0436s 10 44.1136s 10 44.1836s 10 44.2536s 10 44.3236s 10 44.3936s 1 45.409s 10 45.479s 10 45.549s 10 45.619s 10 45.689s 10 45.759s 10 45.829s 1 46.1201s 10 46.1901s 9 46.5552s 10 46.6252s 10 46.6952s 10 46.7652s 10 46.8352s 10 46.9052s 10 46.9752s 10 47.0452s 4 48.7932s 10 48.8632s 10 48.9332s 10 49.0032s 10 49.0732s 10 49.1432s 1 49.3546s 10 49.4246s 10 49.4946s 10 49.5646s 7 50.2757s 10 50.3457s 10 50.4157s 10 50.4857s 10 50.5557s 10 50.6257s 10 50.6957s 10 50.7657s 10 50.8357s 10 50.9057s 1 51.2024s 10 51.2724s 10 52.6008s 10 52.6708s 10 52.7408s 7 53.6441s 10 53.7141s 10 53.7841s 10 53.8541s 9 54.9043s 10 54.9743s 10 55.0443s 10 55.1143s 10 55.1843s 10 55.2543s 10 55.3243s 10 55.3943s 10 55.4643s 10 55.5343s 10 55.6043s 10 55.6743s 10 55.7443s 10 55.8143s 10 55.8843s 10 55.9543s 10 56.0243s 10 56.0943s 10 56.1643s 10 56.2343s 10 56.3043s 10 56.3743s 10 56.4443s 5 56.5002s 10 56.5702s 5 59.2313s 10 59.3013s 10 59.3713s 9 59.5743s 10 59.6443s 10 59.7143s 6 60.3082s 10 60.3782s 10 60.4482s 10 60.5182s 10 60.5882s 10 60.6582s 10 60.7282s 10 60.7982s 10 60.8682s 10 60.9382s 10 61.0082s 10 61.0782s 10 61.1482s 10 61.2182s 6 61.9578s 10 62.0278s 10 62.0978s 10 62.1678s 10 62.2378s 7 62.4385s 10 62.5085s 10 62.5785s 10 62.6485s 10 62.7185s 9 63.1089s 6 63.7513s 10 63.8213s 10 63.8913s 10 63.9613s 10 64.353s 2 64.372s 10 64.442s 10 64.512s 10 66.0617s 10 66.1317s 10 66.2017s 7 67.0835s 1 67.6775s 10 67.7475s 10 67.8175s 10 67.8875s 10 67.9575s 10 68.0275s 10 68.0975s 10 68.1675s 10 68.2375s 10 68.3075s 10 68.3775s 2 68.922s 10 68.992s 10 69.062s 10 69.132s 10 69.202s 10 69.272s 10 69.342s 10 69.412s 10 69.482s 10 69.552s 8 69.9664s 10 70.0364s 10 70.1064s 10 70.1764s 10 70.2464s 10 70.3164s 10 70.3864s 10 70.4564s 10 71.1837s 10 71.2537s 10 71.3237s 7 72.3981s 10 72.4681s 10 72.5381s 10 72.6081s 10 72.6781s 10 72.7481s 10 72.8181s 10 72.8881s 10 72.9581s 10 73.0281s 10 73.0981s 10 73.1681s 10 73.2381s 10 73.3081s 10 73.3781s 10 73.4481s 10 73.5181s 10 73.5881s 10 73.6581s 10 73.7281s 10 73.7981s 10 73.8681s 10 73.9381s 10 74.0081s 10 74.0781s 10 74.1481s 2 74.2606s 10 74.3306s 10 74.4006s 10 74.4706s 10 74.5406s 7 76.4027s 10 76.4727s 10 76.5427s 6 77.2696s 10 77.3396s 10 77.4096s 10 77.4796s 10 77.5496s 7 77.9185s 5 79.0932s 10 79.1632s 10 79.2332s 10 79.3032s 10 79.3732s 10 79.4432s 10 79.5132s 10 79.5832s 10 79.6532s 10 79.7232s 10 79.7932s 10 79.8632s 10 79.9332s 10 80.0032s 10 80.1226s 10 80.1926s 10 80.2626s 10 80.3326s 1 80.6003s 10 80.6703s 10 80.7403s 10 80.8103s 10 80.8803s 10 80.9503s 10 81.0203s 10 81.0903s 10 81.1603s 10 81.4571s 10 81.5271s 7 82.288s 10 82.358s 10 82.428s 10 82.498s 7 83.6412s 6 83.7273s 10 83.7973s 10 83.8673s 10 83.9373s 9 84.2849s 6 84.7498s 6 85.2592s 10 85.3292s 10 85.3992s 10 85.4692s 10 85.5392s 10 85.6092s 10 85.6792s 10 85.7492s 10 85.8192s 10 85.8892s 10 85.9592s 10 86.0292s 10 86.0992s 10 86.1692s 3 86.5379s 10 87.7197s 10 87.7897s 10 87.8597s 10 87.9297s 10 87.9997s 10 88.0697s 10 88.1397s 10 88.2097s 10 88.2797s 10 88.3497s 10 88.4197s 8 88.7714s 10 88.8414s 10 88.9114s 8 89.1264s 10 89.1964s 10 89.2664s 9 89.4774s 10 89.5474s 10 89.6174s 10 89.6874s 10 89.7574s 10 89.8274s 10 89.8974s 10 89.9674s 10 90.0374s 4 90.3031s 10 90.3731s 10 90.4431s 10 90.5131s 10 90.5831s 10 90.6531s 1 90.9945s 10 91.0645s 10 91.1345s 10 91.2045s 10 91.2745s 10 91.3445s 3 93.5248s 10 93.5948s 10 93.6648s 10 93.7348s 4 94.11s 10 94.18s 10 94.25s 10 94.32s 10 94.39s 10 94.46s 10 94.53s 10 94.6s 2 95.1587s 6 95.5085s 8 96.3121s 10 96.3821s 10 96.4521s 10 96.5221s 10 96.5921s 10 96.6621s 10 96.7321s 10 96.8021s 10 96.8721s 10 96.9421s 10 97.0121s 10 97.0821s 10 97.1521s 10 97.2221s 8 98.6041s 10 98.6741s 10 98.7441s 10 98.8141s 10 98.8841s 10 98.9541s 10 99.0241s 10 99.0941s 10 99.1641s 10 99.2341s 10 99.3041s 10 99.3741s 10 99.4441s 3 ")); > > I get a total of ~750 interest transmissions, even though it should have created ~5000. > > I tried with different scenarios as well, the results are not consistent with what I set. When I log the trace file, even the timestamps are not correct. > > Thanks. > > From alexander.afanasyev at ucla.edu Thu Sep 12 10:52:08 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 12 Sep 2013 10:52:08 -0700 Subject: [ndnSIM] A question about the example named "ndn-tree-tracers.cc" In-Reply-To: References: Message-ID: Hi Jin, I suspect that you're modifying not exactly the right file. Did you modify scenario in examples/ folder or did you copy/create ndn-tracers.cc in NS-3's scratch folder? If the latter, then you would want to change scenario's name, so it doesn't conflict with ndnSIM examples (I suspect, but can't be 100% sure, that the scenario you're running is from examples folder, while you have modified file in scratch/ folder). --- Alex On Sep 10, 2013, at 7:17 PM, xuejin wrote: > Hi Alex, > > There are two lines code in the example "ndn-tree-tracers.cc" like following : > > ndn::L3AggregateTracer::InstallAll ("aggregate-trace.txt", Seconds (0.5)); > ndn::L3RateTracer::InstallAll ("rate-trace.txt", Seconds (0.5)); > > When I run the scenario successfully, I get two files named "aggregate-trace.txt" and "rate-trace.txt". > Now, I want to change the file names, so I used the next two lines: > > ndn::L3AggregateTracer::InstallAll ("xuejin-aggregate-trace.txt", Seconds (0.5)); > ndn::L3RateTracer::InstallAll ("xuejin-rate-trace.txt", Seconds (0.5)); > > But after I run it successfully, the files' names still be "aggregate-trace.txt" and "rate-trace.txt". Why names can't change? > > Looking forward to your response. > > Jin Xue -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Thu Sep 12 11:01:31 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 12 Sep 2013 11:01:31 -0700 Subject: [ndnSIM] a question In-Reply-To: <2a2263bb.184b4.1410d462329.Coremail.ndnsim_beginner@163.com> References: <26f9dbb6.eb7b.140eced6306.Coremail.ndnsim_beginner@163.com> <6c2c46b.201f9.141059a97af.Coremail.ndnsim_beginner@163.com> <2a2263bb.184b4.1410d462329.Coremail.ndnsim_beginner@163.com> Message-ID: Hi Wang, You can't just create a new L3Protocol object and expect it do anything useful. This object is the core of NDN stack for the node and maintains NDN-related info throughout the lifetime of the simulated node. What you actually need is to get hold of the L3Protocol object that is part of the specific node. Something like this: Ptr protocol = node->GetObject (); ... --- Alex On Sep 11, 2013, at 6:46 AM, ndnSIM_beginner wrote: > Hi Alex > ........ > > As your advice,i use the function in the way below > > Ptr node=inFace->GetNode(); > for(uint32_t deviceId = 0; deviceId < node->GetNDevices(); deviceId++) > { > Ptr device = node ->GetDevice(deviceId); > L3Protocol *protocol=new L3Protocol(); > Ptr neighborFace=protocol->GetFaceByNetDevice(device); > neighborFace->SendInterest(interest);//error??neighborFace???? > } > > but the content in neighborFace is null!? > i could not for sure that whether i use the function in the correct way > any suggestion? > thanks > Wang > > > > > > At 2013-09-11 01:25:37,"Alex Afanasyev" wrote: > Hi Wang, > > From the channel you can get pointer to NetDevice (channel->GetDevice(x)). Using netdevice pointer you can get pointer to the face, using GetFaceByNetDevice method from ndn::L3Protocol (http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_l3_protocol.html#ad85486f42dff1d171f59af519079615f) > > --- > Alex > > On Sep 9, 2013, at 7:01 PM, ndnSIM_beginner wrote: > >> Hi Alex >> Thank you very much! >> I have read the advice you gave me .It gives me a lot of inspiration. >> I have known how to get devices through nodes ,and how to get channels through devices. >> By the way,how can I get Faces through channel. >> Thank you in advance. >> Wang >> >> >> >> >> >> At 2013-09-06 11:53:57,"Alex Afanasyev" wrote: >> Hi! >> >> You can try to check the old thread http://www.lists.cs.ucla.edu/pipermail/ndnsim/2013-March/000238.html, which may be helpful for you to get an idea how to proceed. >> >> --- >> Alex >> >> On Sep 5, 2013, at 12:01 AM, ndnSIM_beginner wrote: >> >>> Hello Alex, >>> Hello,I am a beginner and my English is not good, >>> I want to achieve a set of node cooperative store.It means that if a node want to store a content,it will send packets to its neighbor nodes.if the content in the neighbor nodes,the node can't store the content. >>> But I don't know how to get around the node interface now.Please give some advic! e. >>> Thanks in advance >> >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jackwee_yao at 163.com Tue Sep 17 18:43:47 2013 From: jackwee_yao at 163.com (JackWee) Date: Wed, 18 Sep 2013 09:43:47 +0800 (CST) Subject: [ndnSIM] multithread issue in ndnsim Message-ID: <1b8a3752.12c58.1412ebccf6a.Coremail.jackwee_yao@163.com> Hi Alex We`re intend to create a forward strategy which some thread function would be used to implement it. So we write some lines as follow: pthread_create(&id_1,NULL,a.OnProbe,&(para)); pthread_create(&id_2,NULL,a.TimeCount,&(para_1)); pthread_join(id_1,NULL); pthread_join(id_2,NULL); Everything is OK while ./waf --run,but something weird happened when Simulate(F3). After the program run for few seconds,the message below appeared. we tried a lot to solve it,but failed.Any suggestion???Thanks a lot!!! sincerely JackWee -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hialex.jpg Type: image/jpeg Size: 48109 bytes Desc: not available URL: From alexander.afanasyev at ucla.edu Tue Sep 17 21:10:52 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Tue, 17 Sep 2013 21:10:52 -0700 Subject: [ndnSIM] multithread issue in ndnsim In-Reply-To: <1b8a3752.12c58.1412ebccf6a.Coremail.jackwee_yao@163.com> References: <1b8a3752.12c58.1412ebccf6a.Coremail.jackwee_yao@163.com> Message-ID: Hi JackWee, Generally, and unless very very carefully used for specific subsets of tasks, threads cannot be used in NS-3 simulation. Therefore, it is "normal" that NS-3 segfaults. If you need to do something "in parallel", you should schedule two event to be run at the same time and NS-3 will take care that they "run" at the same simulation time (each event in NS-3 always takes 0 simulation time). -- Alex On Sep 17, 2013, at 6:43 PM, JackWee wrote: > Hi Alex > We`re intend to create a forward strategy which some thread function would be used to implement it. > So we write some lines as follow: > > pthread_create(&id_1,NULL,a.OnProbe,&(para)); > pthread_create(&id_2,NULL,a.TimeCount,&(para_1)); > pthread_join(id_1,NULL); > pthread_join(id_2,NULL); > > Everything is OK while ./waf --run,but something weird happened when Simulate(F3). > After the program run for few seconds,the message below appeared. > > > we tried a lot to solve it,but failed.Any suggestion???Thanks a lot!!! > &nb! sp; ; sincerely > JackWee > -------------- next part -------------- An HTML attachment was scrubbed... URL: From politoesolve at gmail.com Mon Sep 23 02:30:45 2013 From: politoesolve at gmail.com (liu lily) Date: Mon, 23 Sep 2013 11:30:45 +0200 Subject: [ndnSIM] simulating NDN with IP Message-ID: Hi, I want to simulate a case with NDP and IP together. I hope I can control the IP routing table(namely the IP routing protocols, like OSPF), are there any modules in NDNsim that support IP and IP routing protocols? thanks! or can I run quagga over DEC over ndnSim? thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Mon Sep 23 10:44:27 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Mon, 23 Sep 2013 10:44:27 -0700 Subject: [ndnSIM] simulating NDN with IP In-Reply-To: References: Message-ID: <7C01BBA2-1C80-4BCD-AEC7-9BE00ECF96BA@ucla.edu> Hi Liu, ndnSIM allows you to connect NDN routers using IP overlay via TcpFace and/or UdpFace. Here is a very basic example: https://github.com/NDN-Routing/ndnSIM/blob/master/examples/ndn-simple-udp.cc Besides these two faces, ndnSIM does not have anything related to IP. If you want to run real dynamic routing protocol, there is nothing that prevents you from running DCE (direct code execution) module with quagga. --- Alex On Sep 23, 2013, at 2:30 AM, liu lily wrote: > Hi, > > I want to simulate a case with NDP and IP together. I hope I can control the IP routing table(namely the IP routing protocols, like OSPF), are there any modules in NDNsim that support IP and IP routing protocols? thanks! or can I run quagga over DEC over ndnSim? > thanks! > _______________________________________________ > 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 xhbreezehu at gmail.com Tue Sep 24 06:36:34 2013 From: xhbreezehu at gmail.com (Xiao yan Hu) Date: Tue, 24 Sep 2013 21:36:34 +0800 Subject: [ndnSIM] How to set attributes for forwarding strategy? Message-ID: Hi guys. Do you have any idea about how to set attributes for forwarding strategy since there is no helper for forwarding strategy? Thanks, Xiaoyan From xhbreezehu at gmail.com Tue Sep 24 19:43:23 2013 From: xhbreezehu at gmail.com (Xiao yan Hu) Date: Wed, 25 Sep 2013 10:43:23 +0800 Subject: [ndnSIM] How to set attributes for forwarding strategy? In-Reply-To: References: Message-ID: Hi Guys, FYI [10:31:22 AM] Xiaoyan Hu: Hi Alex :) [10:31:52 AM] Xiaoyan Hu: would you pls tell me how to set Atrribute for Forwarding stategy [10:32:14 AM] Alex Afanasyev: the ndn stack helper has method SetForwardingStrategy [10:32:48 AM] Alex Afanasyev: this method as a first parameter takes name of the forwarding strategy class, and the rest are pairs of parameters specifying name of the attribute and value of the attribute [10:33:09 AM] Xiaoyan Hu: how to set "CacheUnsolicitedData" Attribute [10:33:19 AM] Alex Afanasyev: ndn::StackHelper helper; [10:33:44 AM] Alex Afanasyev: helper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute", "CacheUnsolicitedData", "true") Thanks, Xiaoyan On Tue, Sep 24, 2013 at 9:36 PM, Xiao yan Hu wrote: > Hi guys. > > Do you have any idea about how to set attributes for forwarding > strategy since there is no helper for forwarding strategy? > > Thanks, > Xiaoyan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From liuzongzhen at cstnet.cn Wed Sep 25 18:41:45 2013 From: liuzongzhen at cstnet.cn (=?GBK?B?wfXX3NXm?=) Date: Thu, 26 Sep 2013 09:41:45 +0800 (GMT+08:00) Subject: [ndnSIM] A question about printing out PIT contents Message-ID: <11688b9.27c9d.14157edd0a3.Coremail.liuzongzhen@cstnet.cn> Hi Alex, I want to print out PIT contents, such as the incoming and outgoing interface. But I don?t know which function to use. Any suggestion?Thanks a lot! Looking forward to your response. Liu Zongzhen -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Wed Sep 25 21:25:52 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Wed, 25 Sep 2013 21:25:52 -0700 Subject: [ndnSIM] A question about printing out PIT contents In-Reply-To: <11688b9.27c9d.14157edd0a3.Coremail.liuzongzhen@cstnet.cn> References: <11688b9.27c9d.14157edd0a3.Coremail.liuzongzhen@cstnet.cn> Message-ID: <601D9137-A03E-4E69-BCB3-6D09083EA9EC@ucla.edu> Hi Liu, You can do something like this: input: Ptr node; Ptr pit = node->GetObject (); for (Ptr entry = pit->Begin (); entry != pit->End (); entry = pit->Next (entry)) { std::cout << *entry << std::endl; } This will print out content of each PIT entry in the default format. If you want some customizations, you can either directly access elements of PIT entry, or modify Print method of Pit implementation. --- Alex On Sep 25, 2013, at 6:41 PM, ??? wrote: > Hi Alex, > > I want to print out PIT contents, such as the incoming and outgoing interface. But I don?t know which function to use. Any suggestion?Thanks a lot! > > Looking forward to your response. > > Liu Zongzhen From alexander.afanasyev at ucla.edu Wed Sep 25 21:32:04 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Wed, 25 Sep 2013 21:32:04 -0700 Subject: [ndnSIM] How to set attributes for forwarding strategy? In-Reply-To: References: Message-ID: Thanks Xiaoyan! I just want to add two links that provide additional information: 1. Basic usage of the helper http://ndnsim.net/helpers.html#forwarding-strategy 2. SetForwardingStrategy method specification: http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_stack_helper.html#a690d7eabecb40df75f9dba29c117fceb --- Alex On Sep 24, 2013, at 7:43 PM, Xiao yan Hu wrote: > Hi Guys, > > FYI > > [10:31:22 AM] Xiaoyan Hu: Hi Alex :) > [10:31:52 AM] Xiaoyan Hu: would you pls tell me how to set Atrribute for Forwarding stategy > [10:32:14 AM] Alex Afanasyev: the ndn stack helper has method SetForwardingStrategy > [10:32:48 AM] Alex Afanasyev: this method as a first parameter takes name of the forwarding strategy class, and the rest are pairs of parameters specifying name of the attribute and value of the attribute > [10:33:09 AM] Xiaoyan Hu: how to set "CacheUnsolicitedData" Attribute > [10:33:19 AM] Alex Afanasyev: ndn::StackHelper helper; > [10:33:44 AM] Alex Afanasyev: helper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute", "CacheUnsolicitedData", "true") > > > Thanks, > Xiaoyan > > > > On Tue, Sep 24, 2013 at 9:36 PM, Xiao yan Hu wrote: > Hi guys. > > Do you have any idea about how to set attributes for forwarding > strategy since there is no helper for forwarding strategy? > > Thanks, > Xiaoyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jackwee_yao at 163.com Thu Sep 26 06:25:29 2013 From: jackwee_yao at 163.com (JackWee) Date: Thu, 26 Sep 2013 21:25:29 +0800 (CST) Subject: [ndnSIM] WillSatisfyPendingInterest Message-ID: <6104df14.21ac2.1415a721bce.Coremail.jackwee_yao@163.com> Hi Alex We are trying to create a new forwarding strategy and notice that there is a function named WillSatisfyPendingInterest() used in OnData and OnInterest. In our forwarding strategy,if we use the function some error sentences appear as below: NS_ASSERT_MSG (record != m_faces.get ().end (), "Update status can be performed only on existing faces of CcxnFibEntry"); And if comment it out,no NS_ASSERT_MSG happen and the strategy run as we wish. we also look up the use of this function in http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_forwarding_strategy.html#a9ccbf12451582834604db78dbd6d1080 but do not get it. Could you tell us the use of this function more specific? And is it a necessary function in implement a forwarding strategy? Thanks a lot and looking forward for your reply. sincerely JackWee -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Thu Sep 26 14:36:49 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Thu, 26 Sep 2013 14:36:49 -0700 Subject: [ndnSIM] WillSatisfyPendingInterest In-Reply-To: <6104df14.21ac2.1415a721bce.Coremail.jackwee_yao@163.com> References: <6104df14.21ac2.1415a721bce.Coremail.jackwee_yao@163.com> Message-ID: <97F3AB47-9AB6-49EE-BD20-0F532436B078@ucla.edu> Hi JackWee, In the current implementation, WillSatisfyPendingInterest performs exactly two operations: 1. Updates RTT estimate for the FIB entry for the incoming interface 2. Performs logging of the fact that Interest is being satisfied. Neither of these operations is strictly necessary. The assert that you're getting is harmless and just indicating that the face that satisfied the Interest wasn't listed in FIB entry (so there is RTT estimate cannot be updated). I have pushed an update that replaced the assert with an if statement, simply ignoring the fact. --- Alex On Sep 26, 2013, at 6:25 AM, JackWee wrote: > Hi Alex > We are trying to create a new forwarding strategy and notice that there is a function named WillSatisfyPendingInterest() used in OnData and OnInterest. > In our forwarding strategy,if we use the function some error sentences appear as below: > > > NS_ASSERT_MSG (record != m_faces.get ().end (), "Update status can be performed only on existing faces of CcxnFibEntry"); > > > And if comment it out,no NS_ASSERT_MSG happen and the strategy run as we wish. > we also look up the use of this function in http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_forwarding_strategy.html#a9ccbf12451582834604db78dbd6d1080 but do not get it. > Could you tell us the use of this function more specific? > And is it a necessary function in implement a forwarding strategy? > Thanks a lot and looking forward for your reply. > sincerely > JackWee From amin at ac.upc.edu Fri Sep 27 04:48:47 2013 From: amin at ac.upc.edu (Amin Karami) Date: Fri, 27 Sep 2013 13:48:47 +0200 Subject: [ndnSIM] A question about printing out PIT contents In-Reply-To: <601D9137-A03E-4E69-BCB3-6D09083EA9EC@ucla.edu> References: <11688b9.27c9d.14157edd0a3.Coremail.liuzongzhen@cstnet.cn> <601D9137-A03E-4E69-BCB3-6D09083EA9EC@ucla.edu> Message-ID: <5245709F.6090409@ac.upc.edu> Hi Alex, If we want to print some extra information such as, RTT (or incoming time of Interest into PIT and the response time) for each entry, what we should do? Thanks a lot. I looking forward to your response. Best Regards, Amin On 09/26/2013 06:25 ?.?, Alex Afanasyev wrote: > Hi Liu, > > You can do something like this: > > input: Ptr node; > > Ptr pit = node->GetObject (); > for (Ptr entry = pit->Begin (); entry != pit->End (); entry = pit->Next (entry)) > { > std::cout << *entry << std::endl; > } > > This will print out content of each PIT entry in the default format. If you want some customizations, you can either directly access elements of PIT entry, or modify Print method of Pit implementation. > > --- > Alex > > On Sep 25, 2013, at 6:41 PM, ??? wrote: > >> Hi Alex, >> >> I want to print out PIT contents, such as the incoming and outgoing interface. But I don?t know which function to use. Any suggestion?Thanks a lot! >> >> Looking forward to your response. >> >> Liu Zongzhen > > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim From alexander.afanasyev at ucla.edu Fri Sep 27 18:43:15 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Fri, 27 Sep 2013 18:43:15 -0700 Subject: [ndnSIM] A question about printing out PIT contents In-Reply-To: <5245709F.6090409@ac.upc.edu> References: <11688b9.27c9d.14157edd0a3.Coremail.liuzongzhen@cstnet.cn> <601D9137-A03E-4E69-BCB3-6D09083EA9EC@ucla.edu> <5245709F.6090409@ac.upc.edu> Message-ID: <51DB16DD-718A-470A-AC03-FF2DE85E6B34@ucla.edu> Hi Amin, Since this information belongs to each individual face (FaceMetric instance) inside FIB entry, you need to access individual items like this: Ptr pit = node->GetObject (); for (Ptr entry = pit->Begin (); entry != pit->End (); entry = pit->Next (entry)) { std::cout << "=========" << std::endl; std::cout << entry->GetPrefix () << std::endl; for (FaceMetricContainer::type::index::type::iterator metric = entry->m_faces.get ().begin (); metric != entry->m_faces.get ().end (); metric++) { os << metric->GetSRtt () << ", " << metric->GetRttVar << "\t"; } } --- Alex On Sep 27, 2013, at 4:48 AM, Amin Karami wrote: > Hi Alex, > If we want to print some extra information such as, RTT (or incoming time of Interest into PIT and the response time) for each entry, what we should do? > Thanks a lot. > > I looking forward to your response. > > Best Regards, > Amin > > > On 09/26/2013 06:25 ?.?, Alex Afanasyev wrote: >> Hi Liu, >> >> You can do something like this: >> >> input: Ptr node; >> >> Ptr pit = node->GetObject (); >> for (Ptr entry = pit->Begin (); entry != pit->End (); entry = pit->Next (entry)) >> { >> std::cout << *entry << std::endl; >> } >> >> This will print out content of each PIT entry in the default format. If you want some customizations, you can either directly access elements of PIT entry, or modify Print method of Pit implementation. >> >> --- >> Alex >> >> On Sep 25, 2013, at 6:41 PM, ??? wrote: >> >>> Hi Alex, >>> >>> I want to print out PIT contents, such as the incoming and outgoing interface. But I don?t know which function to use. Any suggestion?Thanks a lot! >>> >>> Looking forward to your response. >>> >>> Liu Zongzhen >> >> _______________________________________________ >> ndnSIM mailing list >> ndnSIM at lists.cs.ucla.edu >> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim From amin at ac.upc.edu Sat Sep 28 02:56:47 2013 From: amin at ac.upc.edu (Amin Karami) Date: Sat, 28 Sep 2013 11:56:47 +0200 Subject: [ndnSIM] An error in running ./waf In-Reply-To: <51DB16DD-718A-470A-AC03-FF2DE85E6B34@ucla.edu> References: <11688b9.27c9d.14157edd0a3.Coremail.liuzongzhen@cstnet.cn> <601D9137-A03E-4E69-BCB3-6D09083EA9EC@ucla.edu> <5245709F.6090409@ac.upc.edu> <51DB16DD-718A-470A-AC03-FF2DE85E6B34@ucla.edu> Message-ID: <5246A7DF.8090304@ac.upc.edu> Hi Alex, I installed all the requirements for ndnSIM. When i run the command: "./waf --run=ndn-simple --vis", I face with this error: error while loading shared libraries: libboost_graph.so.1.53.0: cannot open shared object file: No such file or directory Command ['/home/amin/Documents/ndnSIM/ns-3/build/src/ndnSIM/examples/ns3-dev-ndn-simple-debug', '--SimulatorImplementationType=ns3::VisualSimulatorImpl'] exited with code 127 But, when i run the command: "LD_LIBRARY_PATH=/usr/local/lib ./waf --run=ndn-simple --vis", It works well :-) What it is the problem? I looking forward to your response. Best Regards, Amin From alexander.afanasyev at ucla.edu Sat Sep 28 15:25:26 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Sat, 28 Sep 2013 15:25:26 -0700 Subject: [ndnSIM] An error in running ./waf In-Reply-To: <5246A7DF.8090304@ac.upc.edu> References: <11688b9.27c9d.14157edd0a3.Coremail.liuzongzhen@cstnet.cn> <601D9137-A03E-4E69-BCB3-6D09083EA9EC@ucla.edu> <5245709F.6090409@ac.upc.edu> <51DB16DD-718A-470A-AC03-FF2DE85E6B34@ucla.edu> <5246A7DF.8090304@ac.upc.edu> Message-ID: Hi Amin, If you're running it on Linux, you may need to run `sudo ldconfig` that updates list of the shared libraries. If you are still getting the error, you can always put "export LD_LIBRARY_PATH=/usr/local/lib" into ~/.bashrc or ~/.profile file. --- Alex On Sep 28, 2013, at 2:56 AM, Amin Karami wrote: > Hi Alex, > I installed all the requirements for ndnSIM. When i run the command: "./waf --run=ndn-simple --vis", I face with this error: > error while loading shared libraries: libboost_graph.so.1.53.0: cannot open shared object file: No such file or directory > Command ['/home/amin/Documents/ndnSIM/ns-3/build/src/ndnSIM/examples/ns3-dev-ndn-simple-debug', '--SimulatorImplementationType=ns3::VisualSimulatorImpl'] exited with code 127 > > But, when i run the command: "LD_LIBRARY_PATH=/usr/local/lib ./waf --run=ndn-simple --vis", It works well :-) > > What it is the problem? > > I looking forward to your response. > > > Best Regards, > Amin From fzufzu at 163.com Sat Sep 28 20:40:30 2013 From: fzufzu at 163.com (fzufzu) Date: Sun, 29 Sep 2013 11:40:30 +0800 (CST) Subject: [ndnSIM] Confused by Forwarding Strategies using In-Reply-To: References: Message-ID: <335259c9.e5.14167cd9dad.Coremail.fzufzu@163.com> I'm confused by learning the forwarding strategies. I ran ndn-tree-with-12tracer.cc in the Terminal as follows in turn ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute"); //ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding"); //ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding"); as you can see, i just changed the Forwardingstragy. Then, i found the trace file (drop-trace.txt) are the same. Then i ran ndn-grid-topo-plugin.cc in the Terminal in the same way. The trace file gather data and sort by the following class. | [ Time | Node | FaceId | FaceDescr | Type | Packets | Kilobytes | PacketRaw | KilobytesRaw | ] | And the data was a mess . It takes me a lot of time to analyze but got nothing finally. There comes my question: When the diffferent forwarding strategies make difference ? Does it make no differences in a scenario with few nodes? -------------- next part -------------- An HTML attachment was scrubbed... URL: From amin at ac.upc.edu Sun Sep 29 03:20:34 2013 From: amin at ac.upc.edu (Amin Karami) Date: Sun, 29 Sep 2013 12:20:34 +0200 Subject: [ndnSIM] OutData vs. InSatisfiedInterests and InData vs. OutSatisfiedInterests Message-ID: <5247FEF2.6020202@ac.upc.edu> Hi friends, In ndnSIM tracer, is any different between "OutData" and "InSatisfiedInterests", and "InData" and "OutSatisfiedInterests" in an interface? Because in my scenarios these parameters are same. Is it correct or incorrect? Best Regards, Amin From amin at ac.upc.edu Sun Sep 29 12:03:28 2013 From: amin at ac.upc.edu (Amin Karami) Date: Sun, 29 Sep 2013 21:03:28 +0200 Subject: [ndnSIM] Control a producer in sending content by itself and neighbor router Message-ID: <52487980.30707@ac.upc.edu> Hi friends, In ndnSIM, (1) How a neighbor router connected to a producer can control the InData rate from a producer? How a router can decrease or increase the rate? (2) Also, I am going to declare an application with start and stop time for a producer. I mean, controlling a OutData rate by a producer itself. I wrote a below code, but App does not work in defined starting/finishing time. ndn::AppHelper producerHelper ("ns3::ndn::Producer"); producerHelper.SetAttribute ("PayloadSize", StringValue("1024")); producerHelper.SetAttribute ("Signature", StringValue("2")); ccnxGlobalRoutingHelper.AddOrigins ("/dst1"); producerHelper.SetPrefix ("/dst1"); producerHelper.Install ("P1"); ApplicationContainer App = producerHelper.Install ("P1"); App.Start(Seconds (2.0)); App.Stop(Seconds (5.0)); I looking forward to hear soon. Best Regards, Amin