<div dir="ltr">Junxiao and Muhammad,<div><br></div><div>Thank you for your responses.  For a little more clarification regarding where the actual data entries are stored:</div><div><br></div><div>When I look at cs.hpp:  <b><a href="http://ndnsim.net/2.1/doxygen/cs_8hpp_source.html">http://ndnsim.net/2.1/doxygen/cs_8hpp_source.html</a></b>, and also the cs.cpp file: <b><a href="http://ndnsim.net/2.1/doxygen/cs_8cpp_source.html">http://ndnsim.net/2.1/doxygen/cs_8cpp_source.html</a></b>, I see the following:</div><div><br></div><div>In the Cs <b>HPP , </b>I see as data (private)<b>:</b></div><div><b><br></b></div><b>Table m_table;<br>unique_ptr<Policy> m_policy;<br>ndn::util::signal::ScopedConnection m_beforeEvictConnection;</b><div><b><br></b></div><div><b><br></b></div><div>So, a table (of entry names?), a smart pointer to the Policy (possibly with a polymorphic object), and a signal - no data.</div><div><br></div><div>In the Cs <b>CPP</b>, I see nothing indicating insertion of data, except <i>through </i>the policy.</div><div><br></div><div>On the contrary, when I look at one of the <b>Policy classes</b>, such as in the FIFO policy (<a href="http://ndnsim.net/2.1/doxygen/cs-policy-priority-fifo_8cpp_source.html">http://ndnsim.net/2.1/doxygen/cs-policy-priority-fifo_8cpp_source.html</a>) I see use of what appears to be a map of entries, and an actual queue (m_queue).</div><div><br></div><div>I'm just trying to wrap my head around what is going where.</div><div><br></div><div>I've been told, or given the impression, that if you want to change the caching algorithm (cache replacement, caching) then the route to go is to provide a subclass of the <b>Policy</b>, NOT the <b>Cs </b>itself.</div><div><br></div><div>Thanks a ton, everyone,</div><div><br></div><div>John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 3, 2016 at 6:58 AM, Junxiao Shi <span dir="ltr"><<a href="mailto:shijunxiao@email.arizona.edu" target="_blank">shijunxiao@email.arizona.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="white-space:pre-wrap">Hi John<br><br>1. With few exceptions, names beginning with /localhost/nfd belong to NFD Management protocol <a href="https://redmine.named-data.net/projects/nfd/wiki/Management" target="_blank">https://redmine.named-data.<wbr>net/projects/nfd/wiki/<wbr>Management</a> . NFD Management protocol is designed as an NDN application layer protocol, so its packets show up as Interests and Data. CS caches them just as any other Data.<br>2. Yes, NS_LOG allows one to enable and disable each logging component individually via NS_LOG environ at runtime. For tracers, see <a href="https://www.nsnam.org/docs/release/3.25/manual/html/tracing.html" target="_blank">https://www.nsnam.org/docs/<wbr>release/3.25/manual/html/<wbr>tracing.html</a> "tracing motivation" and remember that NS_LOG will not work if ns-3 is compiled in release mode.<br>3. No. CS itself caches the Data inside nfd::cs::Entry class and maintains an index based on names. The argument passed to Policy APIs is the iterator on CS's primary index, and Policy maintains a secondary index of those iterators used for eviction. The reason for this separation is to support different Policy types with standard C++ subclasses, rather than complex compile-time templates (which was used in ndnSIM 1.0 and appears as "old ContentStore").<br><br>Yours, Junxiao</div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Fri, Dec 2, 2016 at 23:54 John Baugh <<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr" class="m_-4451462359308866137gmail_msg">Greetings all,<div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg">I'm playing around with some of the content store stuff at the moment and have a couple questions.</div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg">Here are the relevant files to my questions:<br class="m_-4451462359308866137gmail_msg"><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg"><b class="m_-4451462359308866137gmail_msg">My primary simulation file:</b></div><div class="m_-4451462359308866137gmail_msg"><a href="https://drive.google.com/open?id=0By9ufeKqmJYYN0dLMENXOVJjSlE" class="m_-4451462359308866137gmail_msg" target="_blank">https://drive.google.com/open?<wbr>id=<wbr>0By9ufeKqmJYYN0dLMENXOVJjSlE</a><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg"><b class="m_-4451462359308866137gmail_msg">My derived / customized policy class:</b></div><div class="m_-4451462359308866137gmail_msg"><a href="https://drive.google.com/open?id=0By9ufeKqmJYYYUZOQUZFd21ORDA" class="m_-4451462359308866137gmail_msg" target="_blank">https://drive.google.com/open?<wbr>id=<wbr>0By9ufeKqmJYYYUZOQUZFd21ORDA</a><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg"><b class="m_-4451462359308866137gmail_msg">The output of the contents of Content Store:</b></div><div class="m_-4451462359308866137gmail_msg"><a href="https://drive.google.com/open?id=0By9ufeKqmJYYTXdCMU1nN3lYeFU" class="m_-4451462359308866137gmail_msg" target="_blank">https://drive.google.com/open?<wbr>id=<wbr>0By9ufeKqmJYYTXdCMU1nN3lYeFU</a><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div></div><div class="m_-4451462359308866137gmail_msg">Questions:</div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg">1.)  I figure the stuff with /prefix/.... in front of it is just randomized / pseudorandomly generated items just starting with /prefix.  But <b class="m_-4451462359308866137gmail_msg">what in the world is </b>the other garbage being printed to the file?  Usually it's something like /localhost/nfd/faces/enable-<wbr>local/control/<random string>.</div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg">Is this some sort of setup information / link confirmation ACK or something that the nodes send/receive?  Why is the CS caching it as if it were data?  </div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg">2.)  Is there a significant advantage to using one of the NS_LOG or tracers over using standard <fstream> library objects?</div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg">3.)  If I understand correctly, the <b class="m_-4451462359308866137gmail_msg">POLICY </b>is responsible for actually caching the data?  I assume that's all handled with the doBeforeInsert and the related virtual functions, like the policies that ndnSIM provides (FIFO, LRU, etc.), correct?  The Content Store object itself seems to just cache the <i class="m_-4451462359308866137gmail_msg">names</i> and not the actual data?</div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg">Thanks,</div><div class="m_-4451462359308866137gmail_msg"><br class="m_-4451462359308866137gmail_msg"></div><div class="m_-4451462359308866137gmail_msg">John</div></div></div></div><span class="">
______________________________<wbr>_________________<br class="m_-4451462359308866137gmail_msg">
ndnSIM mailing list<br class="m_-4451462359308866137gmail_msg">
<a href="mailto:ndnSIM@lists.cs.ucla.edu" class="m_-4451462359308866137gmail_msg" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br class="m_-4451462359308866137gmail_msg">
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" class="m_-4451462359308866137gmail_msg" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndnsim</a><br class="m_-4451462359308866137gmail_msg">
</span></blockquote></div>
</blockquote></div><br></div>