<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Ashish,</p>
<p>I agree with you that simply extending PIT entry lifetime (using
setExpiryTimer) will not work for "One-Interest-Many-Data" in NFD,
because when you invoke Strategy::sendDataToAll for the second (or
latter) Data, the PIT entry's in-record is already deleted. You
could try these changes:</p>
<ol>
<li>Avoid deleting PIT entry's in-record after forwarding data by
<br>
</li>
<ul>
<li>commenting out this line:
<a class="moz-txt-link-freetext" href="https://github.com/named-data/NFD/blob/master/daemon/fw/strategy.cpp#L203">https://github.com/named-data/NFD/blob/master/daemon/fw/strategy.cpp#L203</a></li>
</ul>
<li>Extending PIT entry's in-record lifetime by</li>
<ul>
<li>adding an update function with the parameter time duration
in pit::FaceRecord (the base class of pit::InRecord)</li>
<li>setting pit entry's in-record lifetime when setting pit
entry's lifetime (invoking the previous added function within
Forwarder::setExpiryTimer:
<a class="moz-txt-link-freetext" href="https://github.com/named-data/NFD/blob/master/daemon/fw/forwarder.cpp#L516">https://github.com/named-data/NFD/blob/master/daemon/fw/forwarder.cpp#L516</a>)</li>
</ul>
<li>Deleting PIT entry's in-records in
Forwarder::onInterestFinalize (this could be optional)</li>
</ol>
Thanks,<br>
Teng
<p><br>
</p>
<div class="moz-cite-prefix">On 11/24/18 5:08 PM, Ashish Pradhan
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPmKrPrYiiOdffe5KdpkFrSP63PXSoD1KfSVV_y5hNpOL1nP1g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hi Xinyu,
<div><br>
</div>
<div>Thank you for your reply.</div>
<div><br>
</div>
<div>I am fully aware of the One-Interest-One-Data behavior.
However, I have a custom app(a producer) where it produces
multiple data for a single interest. Then I want all the
produced data to reach the consumer. So for that, I am
implementing a custom strategy where the PIT entry
lifetime of the nodes are extended after it receives the
first data from the producer. I have followed the ndnSIM
API documentation for it. </div>
<div><br>
</div>
<div>beforeSatisfyInterest documentation:</div>
<div><a
href="http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08"
moz-do-not-send="true">http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08</a><br>
</div>
<div><br>
</div>
<div>setExpiryTimer documentation:<br>
</div>
<div><a
href="http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a967ad88184231f79b245ce202e9d4ea7"
moz-do-not-send="true">http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a967ad88184231f79b245ce202e9d4ea7</a><br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Best regards,</div>
<div dir="ltr">Ashish Pradhan<br>
<div style="font-size:12.8px">
<div style="font-size:12.8px"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Sun, Nov 25, 2018 at 2:21 AM Xinyu Ma <<a
href="mailto:bitmxy@gmail.com" moz-do-not-send="true">bitmxy@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div
style="word-wrap:break-word;line-break:after-white-space">Hello,
Pradhan
<div><br>
</div>
<div>I’m sorry I don’t understand why you want to extend
the PIT entry’s lifetime and what you mean by “data
response other than the first one”.</div>
<div>NDN follows One-Interest-One-Data, so the PIT entry
should be deleted after receiving the data.</div>
<div>You can send another Interest if you still want the
PIT entry to be there.</div>
<div><br>
</div>
<div>Best,</div>
<div>Xinyu Ma.</div>
<div>
<div><br>
<blockquote type="cite">
<div>On Nov 24, 2018, at 6:20 AM, Ashish Pradhan
<<a href="mailto:ashishpradhan1162@gmail.com"
target="_blank" moz-do-not-send="true">ashishpradhan1162@gmail.com</a>>
wrote:</div>
<br
class="m_-7572912407932601274Apple-interchange-newline">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>I am trying to use the setExpiryTimer
to extend the PIT entry's lifetime.
However the data response other than the
first one is not being forwarded back to
the consumer. I have included the
setExpiryTimer in the
beforeSatisfyInterest function as follows:</div>
<div>"NFD_LOG_DEBUG("beforeSatisfyInterest
pitEntry=" << pitEntry->getName()
<<<br>
" inFace=" <<
inFace.getId() << " data=" <<
data.getName());<br>
<br>
this->Strategy::setExpiryTimer(pitEntry,
ndn::time::milliseconds(100));"</div>
<div><br>
</div>
<div>Is there any thing that needs to be
added?<br>
</div>
<div><br>
</div>
<div>After looking at the sendData function
there is this line
"pitEntry->deleteInRecord(outFace);".
If it is deleting the inRecord how does
the setExpiryTimer help to preserve the
entry?</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Ashish Pradhan<br>
</div>
<div>
<div>
<div dir="ltr"
class="m_-7572912407932601274gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><span
style="font-size:12.8px"></span>
<div
style="font-size:12.8px"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu"
target="_blank" moz-do-not-send="true">ndnSIM@lists.cs.ucla.edu</a><br>
<a
href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim"
target="_blank" moz-do-not-send="true">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
ndnSIM mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a>
<a class="moz-txt-link-freetext" href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a>
</pre>
</blockquote>
</body>
</html>