<div dir="ltr">Hi Team,<div><br></div><div>We are following what you have suggested and we are working on CS of NFD.</div><div>Now, we want to store popularity associated with each content. We are thinking to add a field in the Entry class, which would store the popularity of the data associated with this Entry. And after that, we are planning to use that popularity in a sub-class of the Decision-Policy class.</div><div>( <a href="https://github.com/ndncomm/nfd-caching-policies/blob/2ed1d1630f441f0b20fc004d2f74577363a0a967/daemon/table/cs-decision-policy.hpp">https://github.com/ndncomm/nfd-caching-policies/blob/2ed1d1630f441f0b20fc004d2f74577363a0a967/daemon/table/cs-decision-policy.hpp</a>)</div><div><br></div><div>Is there any way by which we can look up a required entry using its name (Data-name) from the Content Store. We want to perform this look-up operation in a sub-class of the (above-mentioned) Decision-Policy class?</div><div><br></div><div><br></div><div>Thanks and Regards,</div><div>Ravi Kumar Singh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 25, 2016 at 12:33 AM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Ravi,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>If you go for the second option, you can take a look at this project: <a href="https://github.com/ndncomm/nfd-caching-ndnsim" target="_blank">https://github.com/ndncomm/nfd-caching-ndnsim</a></div><div>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.</div><div><br></div><div>Hope that this helps.</div><div><span class=""><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><span style="float:none;display:inline!important"><br></span></div></div></div><div><br></div><br>
</div>
<br></span><div><div class="h5"><div><blockquote type="cite"><div>On Apr 24, 2016, at 5:45 PM, Lixia Zhang <<a href="mailto:lixia@cs.ucla.edu" target="_blank">lixia@cs.ucla.edu</a>> wrote:</div><br><div><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Apr 24, 2016, at 1:04 PM, Ravi Kumar Singh <<a href="mailto:rk8000@g.rit.edu" target="_blank">rk8000@g.rit.edu</a>> wrote:</div><br><div><div dir="ltr"><span style="font-size:12.8px">Hi Lixia / Team,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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.</div></div></div></blockquote><div><br></div>I must admit that I dont know the code details. So we need Alex or Spyros to help out here.</div><div><br><blockquote type="cite"><div><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 20, 2016 at 3:14 AM, Ravi Kumar Singh <span dir="ltr"><<a href="mailto:rk8000@g.rit.edu" target="_blank">rk8000@g.rit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Lixia/Spyridon! I will implement this and will let you the results! Thank you so much again!</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 20, 2016 at 1:03 AM, Lixia Zhang <span dir="ltr"><<a href="mailto:lixia@cs.ucla.edu" target="_blank">lixia@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Apr 18, 2016, at 10:40 AM, Spyridon (Spyros) Mastorakis <<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>> wrote:</div><br><div><div style="word-wrap:break-word">Hi Ravi,<div><br></div><div>that looks right to me.</div><div><br></div><div>There is also something else that you need to do:</div><div><br></div><div>your consumer application should express Interests with the “mustBeFresh” selector set in order to retrieve only “fresh” data:</div><div><br></div><div><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/interest.hpp#L417-L423" target="_blank">https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/interest.hpp#L417-L423</a></div><div><br></div><div>To this end you should do something like that:</div><div><br></div><div>Interest i(name);</div><div>i.setMustBeFresh(true);</div><div>...</div><div>…</div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,255,255)">m_face-></span><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap">onReceiveInterest</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,255,255)">(*interest);</span></div><div><br></div><div>Hope that this helps.</div><div><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div></div></div></div></div></div></div></blockquote><div><br></div></span>copied the list here.</div><div>Ravi, hopefully your issue was resolved?</div><div><div><div><br><br><div><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div>On Apr 17, 2016, at 11:54 PM, Ravi Kumar Singh <<a href="mailto:rk8000@g.rit.edu" target="_blank">rk8000@g.rit.edu</a>> wrote:</div><br><div><div dir="ltr"><div>Hi Lixia,</div><div><br></div>No, I am not aware where we need to set this <span style="font-size:12.8px">"must be fresh". I just followed the below link:</span><div><span style="font-size:12.8px"><br></span><div><span style="font-size:12.8px"><a href="https://github.com/cawka/ndnSIM-examples/blob/master/examples/ndn-simple-with-content-freshness.cc" target="_blank">https://github.com/cawka/ndnSIM-examples/blob/master/examples/ndn-simple-with-content-freshness.cc</a></span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">and changed like below:</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">ccnxHelper.</span><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">SetContentStore</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"> (</span><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><span>"</span>ns3::ndn::cs::Freshness::Lru<span>"</span></span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">,</span><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><span>"</span>MaxSize<span>"</span></span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">, </span><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><span>"</span>2<span>"</span></span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">);</span><span style="font-size:12.8px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">and </span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">producerHelper.</span><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">SetAttribute</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"> (</span><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><span>"</span>Freshness<span>"</span></span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">, </span><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">TimeValue</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"> (</span><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">Seconds</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"> (</span><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">2.0</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">)));</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">Please let me know where exactly we have to set </span><span style="font-size:12.8px">"must be fresh" or anything we need to do?</span></div></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks and Regards,</span></div><div><span style="font-size:12.8px">Ravi Kumar Singh</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 17, 2016 at 11:25 PM, Lixia Zhang <span dir="ltr"><<a href="mailto:lixia@cs.ucla.edu" target="_blank">lixia@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Apr 17, 2016, at 12:27 PM, Ravi Kumar Singh <<a href="mailto:rk8000@g.rit.edu" target="_blank">rk8000@g.rit.edu</a>> wrote:</div><br><div><div dir="ltr"><font face="verdana, sans-serif">Hi Alex/Lixia/Team,</font><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">Thank you so much for the help! Now, I am trying to use the </font><span style="font-family:monospace;font-size:13.9333px;background-color:rgb(236,240,243)">ns3::ndn::cs::Freshness::Lru</span><span style="font-family:verdana,sans-serif">   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(</span><span style="font-family:monospace;font-size:13.9333px;background-color:rgb(236,240,243)">ns3::ndn::cs::Freshness::Lru)</span><span style="font-family:verdana,sans-serif">,it</span><span style="font-family:verdana,sans-serif;line-height:19.0667px;text-align:justify"> cache Data packets only for the time indicated by FreshnessPeriod.</span></div></div></div></blockquote><div><br></div></span>did you set "must be fresh" in your interests packets?</div><div><br><blockquote type="cite"><div><div><div><div dir="ltr"><div><span style="font-family:verdana,sans-serif;line-height:19.0667px;text-align:justify">Thanks and Regards,</span></div><div><span style="font-family:verdana,sans-serif;line-height:19.0667px;text-align:justify">Ravi Singh</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 13, 2016 at 9:41 PM, Alex Afanasyev <span dir="ltr"><<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Apr 12, 2016, at 11:13 PM, Ravi Kumar Singh <<a href="mailto:rk8000@g.rit.edu" target="_blank">rk8000@g.rit.edu</a>> wrote:</div><br><div><div dir="ltr">Forgot to include team.<div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Ravi Kumar Singh</b> <span dir="ltr"><<a href="mailto:rk8000@g.rit.edu" target="_blank">rk8000@g.rit.edu</a>></span><br>Date: Wed, Apr 13, 2016 at 2:11 AM<br>Subject: Re: [ndnSIM] Seeking help regarding ndnsim; intreset with different sequence number<br>To: Lixia Zhang <<a href="mailto:lixia@cs.ucla.edu" target="_blank">lixia@cs.ucla.edu</a>><br><br><br><div dir="ltr">Thanks Lixia! I will try setting <span style="font-size:12.8px"> up a second consumer to request the same data. </span><div><span style="font-size:12.8px">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 <b>not even</b> forwarding from the consumer(same) itself. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Following is a log of its operation ( with my own implemention of one consumer sending three same interest):</span><br style="font-size:12.8px"><br style="font-size:12.8px"><font face="monospace, monospace" style="font-size:12.8px">1: 1s 0 CustomApp:SendInterest(): [DEBUG] Sending Interest packet for /root/%FE%00?ndn.InterestLifetime=1000&ndn.Nonce=4231791817<br>2: 1s 0 CustomApp:SendInterest(): [DEBUG] Sending Interest packet for /root/%FE%00?ndn.InterestLifetime=1000&ndn.Nonce=<a href="tel:2837832477" value="+12837832477" target="_blank">2837832477</a><br>3: 1s 0 CustomApp:SendInterest(): [DEBUG] Sending Interest packet for /root/%FE%00?ndn.InterestLifetime=1000&ndn.Nonce=2794407255<br>4: 1.01002s 1 ndn.cs.Lru:Lookup(0x1493c10, /root/%FE%00)<br>5: 1.02004s 2 ndn.Producer:OnInterest(0x14fce90, 0x1528ae8)<br>6: 1.02004s 2 ndn.Producer:OnInterest(): [INFO ] node(2) responding with Data: /root/%FE%00<br>7: 1.03089s 1 ndn.cs.Lru:Add(0x1493c10, /root/%FE%00)<br>8: 1.04174s 0 CustomApp:OnData(): [DEBUG] Receiving Data packet for /root/%FE%00</font><span style="font-size:12.8px"><br></span></div><div><font face="monospace, monospace" style="font-size:12.8px"><br></font></div><div><font face="monospace, monospace" style="font-size:12.8px">As, you can see from the log, only first interest is working file and rest 2 interest are <b>not even</b> forwarding from the consumer itself.</font></div></div></div></div></div></div></blockquote><div><br></div></span><div>Hi Ravi,</div><div><br></div><div>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.</div><div><br></div><div>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).</div><div><br></div><div>---</div><div>Alex</div><span><br><blockquote type="cite"><div><div dir="ltr"><div><div class="gmail_quote"><div dir="ltr"><div><font face="monospace, monospace" style="font-size:12.8px">Please suggest!</font></div><div><font face="monospace, monospace" style="font-size:12.8px"><br></font></div><div><font face="monospace, monospace" style="font-size:12.8px">Regards,</font></div><div><font face="monospace, monospace" style="font-size:12.8px">Ravi</font></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 13, 2016 at 12:31 AM, Lixia Zhang <span dir="ltr"><<a href="mailto:lixia@cs.ucla.edu" target="_blank">lixia@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span><br><div><blockquote type="cite"><div>On Apr 12, 2016, at 9:20 PM, Ravi Kumar Singh <<a href="mailto:rk8000@g.rit.edu" target="_blank">rk8000@g.rit.edu</a>> wrote:</div><br><div><div dir="ltr"><span style="font-size:12.8px">Hi Team,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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.</div><div style="font-size:12.8px">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.</div><div style="font-size:12.8px">We tried googling but couldn't found any relevant link for this scenario.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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).</div></div></div></blockquote><br></div></span><div>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.</div></div></blockquote></div></div></div></div></div></div></div></div></blockquote></span></div><br></div></blockquote></div><br></div></div></div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></div></div></blockquote><br></div></div></div></div></div><br></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></blockquote></div><br></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>