[ndnSIM] Seeking help regarding ndnsim; intreset with different sequence number

Ravi Kumar Singh rk8000 at g.rit.edu
Tue Apr 26 08:53:50 PDT 2016


Thank you so much Spyros!
I was wondering how can I count the number of interest packets received by
Cache content store for a particular content? And what and
wherein the Cache content store code I need to change to account for this?

Thanks and Regards,
Ravi Kumar Singh

On Mon, Apr 25, 2016 at 12:33 AM, Spyridon (Spyros) Mastorakis <
mastorakis at cs.ucla.edu> wrote:

> Hi Ravi,
>
> the first thing you will have to do is to decide whether you would like to
> implement a replacement policy using the ndnSIM-specific implementation of
> CS or the CS of NFD.
>
> If you go for the first one, you should take a look at the already
> implemented policies and also search for papers that have implemented
> replacement policies for ndnSIM. Some of them provide pointers to the
> source code.
>
> If you go for the second option, you can take a look at this project:
> https://github.com/ndncomm/nfd-caching-ndnsim
> It is a project of the first NDN hackathon, where people implemented a
> number of CS replacement policies for the version of NFD used by ndnSIM.
>
> Hope that this helps.
>
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
>
>
>
> On Apr 24, 2016, at 5:45 PM, Lixia Zhang <lixia at cs.ucla.edu> wrote:
>
>
> On Apr 24, 2016, at 1:04 PM, Ravi Kumar Singh <rk8000 at g.rit.edu> wrote:
>
> Hi Lixia / Team,
>
> I would like to create a custom cache replacement policy. I went through
> the LruPolicy class and I can see that it contains methods
> like evictEntries, insertToQueue, etc. However, it is not clear, when, how
> these methods are called.
>
> I believe in order to achieve what I want to, I would have to create a
> similar class. Am I on the right path here? Some starting point
> documentation of how the flow is would be really helpful.
>
>
> I must admit that I dont know the code details. So we need Alex or Spyros
> to help out here.
>
> On Wed, Apr 20, 2016 at 3:14 AM, Ravi Kumar Singh <rk8000 at g.rit.edu>
> wrote:
>
>> Thanks Lixia/Spyridon! I will implement this and will let you the
>> results! Thank you so much again!
>>
>> On Wed, Apr 20, 2016 at 1:03 AM, Lixia Zhang <lixia at cs.ucla.edu> wrote:
>>
>>>
>>> On Apr 18, 2016, at 10:40 AM, Spyridon (Spyros) Mastorakis <
>>> mastorakis at cs.ucla.edu> wrote:
>>>
>>> Hi Ravi,
>>>
>>> that looks right to me.
>>>
>>> There is also something else that you need to do:
>>>
>>> your consumer application should express Interests with the
>>> “mustBeFresh” selector set in order to retrieve only “fresh” data:
>>>
>>>
>>> https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/interest.hpp#L417-L423
>>>
>>> To this end you should do something like that:
>>>
>>> Interest i(name);
>>> i.setMustBeFresh(true);
>>> ...
>>>>>> m_face->onReceiveInterest(*interest);
>>>
>>> Hope that this helps.
>>>
>>> Spyridon (Spyros) Mastorakis
>>> Personal Website: http://cs.ucla.edu/~mastorakis/
>>> Internet Research Laboratory
>>> Computer Science Department
>>> UCLA
>>>
>>>
>>> copied the list here.
>>> Ravi, hopefully your issue was resolved?
>>>
>>>
>>> On Apr 17, 2016, at 11:54 PM, Ravi Kumar Singh <rk8000 at g.rit.edu> wrote:
>>>
>>> Hi Lixia,
>>>
>>> No, I am not aware where we need to set this "must be fresh". I just
>>> followed the below link:
>>>
>>>
>>> https://github.com/cawka/ndnSIM-examples/blob/master/examples/ndn-simple-with-content-freshness.cc
>>>
>>> and changed like below:
>>>
>>> ccnxHelper.SetContentStore ("ns3::ndn::cs::Freshness::Lru","MaxSize", "2
>>> ");
>>>
>>> and
>>> producerHelper.SetAttribute ("Freshness", TimeValue (Seconds (2.0)));
>>>
>>> Please let me know where exactly we have to set "must be fresh" or
>>> anything we need to do?
>>>
>>> Thanks and Regards,
>>> Ravi Kumar Singh
>>>
>>> On Sun, Apr 17, 2016 at 11:25 PM, Lixia Zhang <lixia at cs.ucla.edu> wrote:
>>>
>>>>
>>>> On Apr 17, 2016, at 12:27 PM, Ravi Kumar Singh <rk8000 at g.rit.edu>
>>>> wrote:
>>>>
>>>> Hi Alex/Lixia/Team,
>>>>
>>>> Thank you so much for the help! Now, I am trying to use the
>>>> ns3::ndn::cs::Freshness::Lru   feature to use the freshness. But it
>>>> seems its not giving desired results. Even after the freshness has expired
>>>> the next interest is being served from the Cache server and not from the
>>>> Origin Server. And as per the policy(ns3::ndn::cs::Freshness::Lru),it cache
>>>> Data packets only for the time indicated by FreshnessPeriod.
>>>>
>>>>
>>>> did you set "must be fresh" in your interests packets?
>>>>
>>>> Thanks and Regards,
>>>> Ravi Singh
>>>>
>>>> On Wed, Apr 13, 2016 at 9:41 PM, Alex Afanasyev <aa at cs.ucla.edu> wrote:
>>>>
>>>>>
>>>>> On Apr 12, 2016, at 11:13 PM, Ravi Kumar Singh <rk8000 at g.rit.edu>
>>>>> wrote:
>>>>>
>>>>> Forgot to include team.
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: Ravi Kumar Singh <rk8000 at g.rit.edu>
>>>>> Date: Wed, Apr 13, 2016 at 2:11 AM
>>>>> Subject: Re: [ndnSIM] Seeking help regarding ndnsim; intreset with
>>>>> different sequence number
>>>>> To: Lixia Zhang <lixia at cs.ucla.edu>
>>>>>
>>>>>
>>>>> Thanks Lixia! I will try setting  up a second consumer to request the
>>>>> same data.
>>>>> But, in our experiment, we need to see what happens when the same
>>>>> consumer requests the same interest multiple times. I tried writing my own
>>>>> implementation of a consumer, but still only the first interest is working
>>>>> well and rest all interest are *not even* forwarding from the
>>>>> consumer(same) itself.
>>>>>
>>>>> Following is a log of its operation ( with my own implemention of one
>>>>> consumer sending three same interest):
>>>>>
>>>>> 1: 1s 0 CustomApp:SendInterest(): [DEBUG] Sending Interest packet for
>>>>> /root/%FE%00?ndn.InterestLifetime=1000&ndn.Nonce=4231791817
>>>>> 2: 1s 0 CustomApp:SendInterest(): [DEBUG] Sending Interest packet for
>>>>> /root/%FE%00?ndn.InterestLifetime=1000&ndn.Nonce=2837832477
>>>>> 3: 1s 0 CustomApp:SendInterest(): [DEBUG] Sending Interest packet for
>>>>> /root/%FE%00?ndn.InterestLifetime=1000&ndn.Nonce=2794407255
>>>>> 4: 1.01002s 1 ndn.cs.Lru:Lookup(0x1493c10, /root/%FE%00)
>>>>> 5: 1.02004s 2 ndn.Producer:OnInterest(0x14fce90, 0x1528ae8)
>>>>> 6: 1.02004s 2 ndn.Producer:OnInterest(): [INFO ] node(2) responding
>>>>> with Data: /root/%FE%00
>>>>> 7: 1.03089s 1 ndn.cs.Lru:Add(0x1493c10, /root/%FE%00)
>>>>> 8: 1.04174s 0 CustomApp:OnData(): [DEBUG] Receiving Data packet for
>>>>> /root/%FE%00
>>>>>
>>>>> As, you can see from the log, only first interest is working file and
>>>>> rest 2 interest are *not even* forwarding from the consumer itself.
>>>>>
>>>>>
>>>>> Hi Ravi,
>>>>>
>>>>> What you see is correct and intentional behavior of an NDN router.
>>>>> You're trying to send 3 interests for the same data at the exactly the same
>>>>> time.  As a result, these 3 interests will be aggregated into one and only
>>>>> one will be sent further. Also, given that the same app (though the same
>>>>> face) is sending those interests, only one data is returned back.
>>>>>
>>>>> Depending on what specific effect you want to observe, you may want to
>>>>> spread out sending interests in time and/or request from different
>>>>> simulated nodes (different app instances).
>>>>>
>>>>> ---
>>>>> Alex
>>>>>
>>>>> Please suggest!
>>>>>
>>>>> Regards,
>>>>> Ravi
>>>>>
>>>>> On Wed, Apr 13, 2016 at 12:31 AM, Lixia Zhang <lixia at cs.ucla.edu>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> On Apr 12, 2016, at 9:20 PM, Ravi Kumar Singh <rk8000 at g.rit.edu>
>>>>>> wrote:
>>>>>>
>>>>>> Hi Team,
>>>>>>
>>>>>> I am a Graduate student of Rochester Institue of Technology, New
>>>>>> York. Currently, I am working on a research paper based on NDN along with
>>>>>> my Prof.
>>>>>> Currently, we want to simulate the NDN with your software NDNSIM. We
>>>>>> want to simulate the scenario where the consumer is sending the same
>>>>>> interest (same sequence number) multiple times to the producer so that the
>>>>>> cache Server would serve the interest as it would have the content in its
>>>>>> cache instead of serving the request from the producer.
>>>>>> We tried googling but couldn't found any relevant link for this
>>>>>> scenario.
>>>>>>
>>>>>> Requesting you to please help us on how we can simulate the scenario
>>>>>> where the consumer is sending the same interest(same sequence number)
>>>>>> instead of the incremental sequence number (default behaviour).
>>>>>>
>>>>>>
>>>>>> it seems to me easier to set up a second consumer to request the same
>>>>>> data, rather than forcing the same consumer to send repeated interest.
>>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160426/5bc563e7/attachment.html>


More information about the ndnSIM mailing list