<div dir="ltr">Hi Navdeep<div><br></div><div>I tried a scenario similar to this.</div><div>I have NFD configured as default, except that loglevel for Forwarder,Strategy,BestRouteStrategy2 are set to DEBUG.</div><div><br></div><div>In the first experiment, I execute `ndnpeek /A` on the console and wait for it to timeout.</div><div>The log lines related to this Interest are:</div><div><div><font face="monospace, monospace">1440541933.178175 DEBUG: [Forwarder] onIncomingInterest face=261 interest=/A</font></div><div><font face="monospace, monospace">1440541933.178432 DEBUG: [Forwarder] onContentStoreMiss interest=/A</font></div><div><font face="monospace, monospace">1440541933.178521 DEBUG: [BestRouteStrategy2] /A?ndn.Nonce=294193691 from=261 noNextHop</font></div><div><font face="monospace, monospace">1440541933.178585 DEBUG: [Forwarder] onInterestReject interest=/A</font></div><div><font face="monospace, monospace">1440541933.279071 DEBUG: [Forwarder] onInterestFinalize interest=/A unsatisfied</font></div></div><div><br></div><div>In the second experiment, I execute `nfdc register /A tcp4://<a href="http://spurs.cs.ucla.edu">spurs.cs.ucla.edu</a>` to create a route toward the prefix, then execute `ndnpeek /A` and wait for timeout.</div><div>The log lines related to this Interest are:</div><div><div><font face="monospace, monospace">1440542132.989179 DEBUG: [Forwarder] onIncomingInterest face=263 interest=/A</font></div><div><font face="monospace, monospace">1440542132.989297 DEBUG: [Forwarder] onContentStoreMiss interest=/A</font></div><div><font face="monospace, monospace">1440542132.989376 DEBUG: [Forwarder] onOutgoingInterest face=262 interest=/A</font></div><div><font face="monospace, monospace">1440542132.989576 DEBUG: [BestRouteStrategy2] /A?ndn.Nonce=2926069994 from=263 newPitEntry-to=262</font></div><div><font face="monospace, monospace">1440542136.991586 DEBUG: [Forwarder] onInterestUnsatisfied interest=/A</font></div><div><font face="monospace, monospace">1440542136.991624 DEBUG: [Strategy] beforeExpirePendingInterest pitEntry=/A</font></div><div><font face="monospace, monospace">1440542136.991649 DEBUG: [Forwarder] onInterestFinalize interest=/A unsatisfied</font></div><div><br></div></div><div>We can see that the "before expire Interest" trigger is triggered only if the Interest has been forwarded but no Data comes back; it's not triggered if Interest was not forwarded / rejected (in BestRouteStrategy2 it's due to lack of FIB entry).</div><div><br></div><div>Not triggering the "before expire Interest" trigger in the first case is a reasonable behavior, because the rejection of this Interest is directly caused by the strategy itself: the strategy is triggered for "after receive Interest" and decides not to forward the Interest, so that forwarding enters the Interest reject pipeline and then finalizes the Interest after the straggler timer. In this situation, the strategy could do whatever it wants within the "after receive Interest" trigger.</div><div>In the second case, the "before expire Interest" trigger would inform strategy about an expiring PIT entry, because the unsatisfied Interest is not caused by the strategy: the strategy has forwarded the Interest somewhere, and it should be triggered when Data comes back (in "before satisfy Interest" trigger) or when nothing comes back (in "before expire Interest" trigger).</div><div><br></div><div>Yours, Junxiao<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 20, 2015 at 5:44 AM, Navdeep Uniyal <span dir="ltr"><<a href="mailto:navdeep.uniyal@neclab.eu" target="_blank">navdeep.uniyal@neclab.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div lang="DE" link="blue" vlink="#954F72">
<div>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US">Hi Junxiao,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US">Below are the client and server configuration which I am using. As none of the files held by server matches with interest, all requests are getting timed out. While overriding the method, currently
 I am just trying to check if it works, may be later I will include more code as per the requirement.<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Client conf:<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">##########<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">TrafficPercentage=100<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Name=/ndn/nle/file<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">ExpectedContent=AAAAAAAA<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:'Lucida Console'">##########<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)">Server Conf:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">##########<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Name=/ndn/nle/file1<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Content=AAAAAAAA<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">ContentBytes=5000<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">##########<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Name=/ndn/nle/file2<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Content=AAAAAAAB<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">ContentBytes=5000<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">##########<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Name=/ndn/nle/file3<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Content=AAAAAAAC<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">ContentBytes=5000<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">##########<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Name=/ndn/nle/file6<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">Content=AAAAAAAF<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">ContentBytes=5000<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'">##########<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10pt;font-family:'Lucida Console'"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">Method:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">void<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">WeightedLoadBalancerStrategy::beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">   {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">          NFD_LOG_TRACE("Entering beforeExpirePendingInterest"<<pitEntry->getName());<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">   }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">Best Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas;color:rgb(31,73,125)">Navdeep Uniyal<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas;color:rgb(31,73,125)"><u></u> <u></u></span></p>
</div>
<div>
<div style="border-style:solid none none;border-top-color:rgb(181,196,223);border-top-width:1pt;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10pt;font-family:Tahoma,sans-serif">From:</span></b><span lang="EN-US" style="font-size:10pt;font-family:Tahoma,sans-serif"> Junxiao Shi [mailto:<a href="mailto:shijunxiao@email.arizona.edu" target="_blank">shijunxiao@email.arizona.edu</a>]
<br>
<b>Sent:</b> Donnerstag, 20. August 2015 14:36<br>
<b>To:</b> Navdeep Uniyal; Steve DiBenedetto<br>
<b>Cc:</b> <a href="mailto:nfd-dev@lists.cs.ucla.edu" target="_blank">nfd-dev@lists.cs.ucla.edu</a><br>
<b>Subject:</b> RE: [Nfd-dev] beforeExpirePendingInterest for forwarding strategy<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p><span lang="EN-US">Hi Navdeep<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<p><span lang="EN-US">beforeExpirePendingInterest should be triggered when PIT entry is
<u>unsatisfied</u> after InterestLifetime.<u></u><u></u></span></p>
<p><span lang="EN-US">If you find it’s not triggered, give more details of your setup including the topology and the configuration files of traffic generator server and client.<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<p><span lang="EN-US">Yours, Junxiao<u></u><u></u></span></p>
<p><span lang="EN-US"><u></u> <u></u></span></p>
<div style="border-style:solid none none;border-top-color:rgb(225,225,225);border-top-width:1pt;padding:3pt 0cm 0cm">
<p><span lang="EN-US"><br>
<b>From: </b>Navdeep Uniyal<br>
<b>Sent: </b>Thursday, August 20, 2015 05:15<br>
<b>To: </b>Steve DiBenedetto<br>
<b>Cc: </b><a href="mailto:nfd-dev@lists.cs.ucla.edu" target="_blank">nfd-dev@lists.cs.ucla.edu</a><br>
<b>Subject: </b>Re: [Nfd-dev] beforeExpirePendingInterest for forwarding strategy<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:'Times New Roman',serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:'Times New Roman',serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">Hi Steve,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">Thank you for your reply. I have a doubt regarding the triggering of this event. I am using Ndn Traffic Generator for testing my strategy. I am overriding this method “beforeExpirePendingInterest”
 just to get some log trace. But I am unable to see anything in the logs. As per my understanding, for all the timed out interests this method should be triggered. Please if you can suggest what could be the potential issue for the method to be not logging
 anything for the timed out  interest messages.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">Best Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas;color:rgb(31,73,125)">Navdeep Uniyal<u></u><u></u></span></p>
</div>
</div></div></div>
</div>

</blockquote></div><br></div></div></div>