<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Hauchen,</div><div><br></div><div>I'm not sure that you can get any meaningful results using NS-3, since it was designed to simulate events, and not exactly suite for processing evaluation, unless this processing is defined as a sequence of events.  You may want to check this info <a href="http://www.nsnam.org/docs/manual/html/realtime.html">http://www.nsnam.org/docs/manual/html/realtime.html</a> that describes how available schedules in NS-3 work.  The key point is that "during event execution, simulation time is frozen".  You can still use ndnSIM code and evaluate FIB performance, but you should not rely on any NS-3 time management elements.</div><div><br></div><div>Unfortunately, the implemented in ndnSIM FIB lookup process (actually, it is the same lookup for all other data structures, including Content Store and PIT) is not yet fully documented.  The underlying data structure is a complex tree, where each node of the tree corresponds to a name component, and connection to child nodes is implemented as a hash array.   If you want, you can check more details by looking into the source code in utils/trie/trie.h.  I need to warn though, that this data structure is specific to ndnSIM, and different implementations may have different data structures with different properties.</div><div><br></div><div>Btw. What kind of problems are you getting when you're running the code that you mentioned?</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On May 12, 2013, at 5:57 AM, Haochen Wang <<a href="mailto:haochenallen@gmail.com">haochenallen@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi Alex, <div style="">   I want to know further about the FIB lookup algorithm. I'll also be grateful if there's any doxygen available to read.</div><div style="">   Meanwhile, I recently established a simulation exploring the relation between<b> the quantity of FIB entries</b> and <b>the time of FIB lookup</b>. Unfortunately, the result turns out irrelevant which upsets me. I assume that there must be a relation between the above two contents, could you please give me some hints about the problem?</div>
<div style="">   Also, I use the following sentences to input the FIB entires, and I guess there might be some mistakes leading to the problems.</div><div style="">  <b> for(int i=0; i<1000; i++)</b></div><div><b>  {</b></div>
<div><b>    std::string str = "";</b></div><div><b>    std::stringstream intTostr;</b></div><div><b>    intTostr<<i;</b></div><div><b>    intTostr>>str;</b></div><div><b>    ndn::StackHelper::AddRoute  ("c1", "/data1/data2/"+str, "n1", 1);</b></div>
<div><b>    ndn::StackHelper::AddRoute  ("n1", "/data1/data2/"+str, "p1", 1);</b></div><div><b>   </b></div><div><b>    ndn::StackHelper::AddRoute  ("c1", "/data1/", "n1", 1); // link to n1</b></div>
<div><b>    ndn::StackHelper::AddRoute  ("n1", "/data1/", "p1", 1);</b></div><div><b><br></b></div><div><b>  }</b></div><div style=""> The perfix of interests is "/data1/", c1 for consumer, n1 for router and p1 for producer.</div>
<div style=""> I add contents with prefix "/data1/data2/" into FIB (1000 entries), which I think could have no influence on the results.</div><div style=""> I change the variable "i" to change numbers of entries written into FIB to implement the simulation.</div>
<div style=""><br></div><div style="">Warm Regards,</div><div style="">Haochen</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/11 Alex Afanasyev <span dir="ltr"><<a href="mailto:alexander.afanasyev@ucla.edu" target="_blank">alexander.afanasyev@ucla.edu</a>></span><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"><div>Hi Asit,</div><div><br></div><div>I'm thinking to remove a requirement to have a valid FIB entry, in order to attempt to process interests (though I will still PIT creation procedure), but don't yet have a time frame for that.</div>
<div><br></div><div>You can add default routes automatically using ndn::StackHelper::SetDefaultRoutes method <a href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_stack_helper.html#a12b1c8f16bad953ac3b9bb4a6ab1fcab" target="_blank">http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_stack_helper.html#a12b1c8f16bad953ac3b9bb4a6ab1fcab</a>.  If you don't want to have a dummy prefixes in FIB, you can try to remove lines 350-352 in model/pit/ndn-pit-impl.h, but you probably would need to check other parts of the code, since it was assumed that PIT entry has always a valid reference to PIT: A FIB entry is basically a place where information about past performance of Interest/Data exchanges within this prefix can be stored. </div>
<div><br></div><div>---</div><div>Alex </div><div><div class="h5"><br><div><div>On May 8, 2013, at 5:08 PM, Asit Chakraborti <<a href="mailto:Asit.sc.Chakraborti@huawei.com" target="_blank">Asit.sc.Chakraborti@huawei.com</a>> wrote:</div>
<br><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family:Monaco;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hi Alex,<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
<span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Thanks for the response, that makes sense. I needed to process the interests differently and was planning to create a new<u></u><u></u></span></div>
<div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Forwarding strategy, however, the interests got dropped and didn’t get delivered to the new strategy as there was no<u></u><u></u></span></div>
<div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">FIB match. Either I have to modify the common code to allow PIT entries with no matching FIB (not sure how badly that<u></u><u></u></span></div>
<div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">would violate the entire model), or may be I will try to have dummy “/” entries in the FIB…<u></u><u></u></span></div>
<div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
<span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Thanks,<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Asit.  <u></u><u></u></span></div>
<div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div><div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(181,196,223);padding:3pt 0in 0in">
<div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><b><span style="font-size:10pt;font-family:Tahoma,sans-serif">From:</span></b><span style="font-size:10pt;font-family:Tahoma,sans-serif"><span> </span>Alexander Afanasyev [mailto:<a href="mailto:cawka1@" target="_blank">cawka1@</a><a href="http://gmail.com/" target="_blank">gmail.com</a>]<span> </span><b>On Behalf Of<span> </span></b>Alex Afanasyev<br>
<b>Sent:</b><span> </span>Wednesday, May 08, 2013 4:28 PM<br><b>To:</b><span> </span>Asit Chakraborti<br><b>Cc:</b><span> </span><a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a><br><b>Subject:</b><span> </span>Re: [ndnSIM] Question on FIB matching<u></u><u></u></span></div>
</div></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><u></u> <u></u></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
Hi Asit,<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
The currently implemented way always attempts to lookup FIB and create PIT entry for incoming interest, and if there is a CS match, such a PIT entry will be immediately satisfied.<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
<u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">The main reason behind this implementation is to unify metric calculation: for every interest there will always be either new or existing PIT entry, and every satisfied interest can be tracked via PIT entry satisfaction.  It is technically<span> </span> possible to change the implementation, but I'm not yet sure if this would get any major benefits.<u></u><u></u></div>
</div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
As for last question.  Yes, it is assumed that there is always some FIB entry, at least a default entry for root prefix, that can match incoming interests.  And if there is no such entry, then NDN router is not willing to do anything with such interests.<u></u><u></u></div>
</div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
Do you have a specific scenario where this assumption doesn't hold?  It is relatively easy to create an alternative forwarding strategy with slightly different processing logic.<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
<u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">---<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
Alex<u></u><u></u></div></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><u></u> <u></u></div><div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
On May 8, 2013, at 3:31 PM, Asit Chakraborti <<a href="mailto:Asit.sc.Chakraborti@huawei.com" style="color:purple;text-decoration:underline" target="_blank">Asit.sc.Chakraborti@huawei.com</a>> wrote:<u></u><u></u></div>
</div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><br><br><u></u><u></u></div><div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
<span style="font-size:11pt;font-family:Calibri,sans-serif">Hi Alex,<u></u><u></u></span></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif"> <u></u><u></u></span></div>
</div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif">My understanding of the code could be wrong, but it seems we require a FIB match on an incoming<u></u><u></u></span></div>
</div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif">Interest even before a CS match. Any historical reason behind this ? Or is it just the fact that with<u></u><u></u></span></div>
</div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif">the current model and APIs, a FIB entry usually exists if the content is in content store ?<u></u><u></u></span></div>
</div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif"> <u></u><u></u></span></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif">
<span style="font-size:11pt;font-family:Calibri,sans-serif">Thanks,<br>Asit.<u></u><u></u></span></div></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:13.5pt;font-family:Monaco,serif">_______________________________________________<br>
ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" style="color:purple;text-decoration:underline" target="_blank"><span style="color:purple">ndnSIM@lists.cs.ucla.edu</span></a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" style="color:purple;text-decoration:underline" target="_blank"><span style="color:purple">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</span></a><u></u><u></u></span></div>
</div></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><u></u> <u></u></div></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" style="color:purple;text-decoration:underline" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" style="color:purple;text-decoration:underline" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div><br></div></div>
</div><br>_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu">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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>*********************************************</div><div>Beijing University of Posts and Telecommunications,</div><div>No.10 Xi Tu Cheng Rd., Hai Dian Dis.,</div>
<div>Beijing, CHINA, 100876</div><div>School of Information and Communications,</div><div>Cell Phone: 86-13581958046</div><div>*********************************************</div>
</div>
</blockquote></div><br></body></html>