<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello, Pradhan<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 24, 2018, at 9:38 PM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" class="">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div style="font-size:12.8px" class="">Can't this be done simply by making a custom strategy and using the setExpiryTimer? If not, where is the setExpiryTimer useful?</div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">In the documentation it is mentioned that "</span><span style="font-size: 13px; font-family: "Lucida Grande", Verdana, Geneva, Arial, sans-serif;" class="">If the strategy wishes to collect responses from additional upstream nodes, it should invoke </span><code style="font-size: 13px;" class="">setExpiryTimer</code><span style="font-size: 13px; font-family: "Lucida Grande", Verdana, Geneva, Arial, sans-serif;" class=""> within this function to prolong the PIT entry lifetime. If a Data arrives from another upstream during the extended PIT entry lifetime, this trigger will be invoked again. At that time, this function must invoke </span><code style="font-size: 13px;" class="">setExpiryTimer</code><span style="font-size: 13px; font-family: "Lucida Grande", Verdana, Geneva, Arial, sans-serif;" class=""> again to continue collecting more responses.</span><span style="font-size:12.8px" class="">" <a href="http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08" class="">http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08</a></span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">Shouldn't this simply work?</span></div></div></div></div></div></div></div></div><br class=""></div></blockquote><div><br class=""></div><div>Yes, this works if you only want to "<span class="">prolong the PIT entry lifetime</span><span class="">” and “</span><span class="">collecting more responses</span><span class="">” at this node.</span></div><div><span class="">But what you need is to continue forwarding data, which means the in-record of PIT entry should not be deleted.</span></div><div><span class="">In-records are deleted in the “</span><span class="">Strategy::sendData</span><span class="">” function, which is called by “</span>Strategy::afterReceiveData” after “beforeSatisfyInterest”</div><div>So if you don’t want to hack NFD, you can override “afterReceiveData” and try to send Data with “<span class="">m_forwarder.</span><span class="">onOutgoingData</span><span class="">” but not  “sendData”.</span></div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote"><div dir="ltr" class="">On Sun, Nov 25, 2018 at 2:31 PM Lixia Zhang <<a href="mailto:lixia@cs.ucla.edu" class="">lixia@cs.ucla.edu</a>> wrote:<br class=""></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" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Nov 24, 2018, at 9:20 PM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank" class="">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="m_2300554114872668597Apple-interchange-newline"><div class=""><div dir="ltr" class="">No, the producers produces multiple data objects(not segmenting into multiple data packets). </div></div></blockquote><div class=""><br class=""></div>no difference: the producer knows how many total packets it produces.</div><div class=""><br class=""></div></div></blockquote></div></div></blockquote><div><br class=""></div><div>Could you please tell me whether the multiple data objects have the same name?</div><div>If their names are different, I think you can make it with out keep the PIT entry.</div><div><br class=""></div><div>Best wishes,</div><div>Xinyu Ma.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote"><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" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sun, Nov 25, 2018 at 2:15 PM Lixia Zhang <<a href="mailto:lixia@cs.ucla.edu" target="_blank" class="">lixia@cs.ucla.edu</a>> wrote:<br class=""></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" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 24, 2018, at 4:08 PM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank" class="">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="m_2300554114872668597m_-5697558466934445600Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">Hi Xinyu,<div class=""><br class=""></div><div class="">Thank you for your reply.</div><div class=""><br class=""></div><div class="">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.</div></div></div></div></div></blockquote><div class=""><br class=""></div>I would like to better understand what is going on here: do you mean the producer app generates a data object which needs to be segmented into multiple data packets?</div><div class=""><br class=""></div><div class="">If so: yes one can find a way to hack the code to allow the bread crumb of one Interest to retrieve multiple data packets, but it is unclear to me a good idea to use across a network </div><div class="">(one interest can retrieve the first data packet, which can carry "<span style="color:rgb(34,34,34);font-size:0.9em;background-color:rgb(247,247,247)" class="">FinalBlockId" to inform the consumer how many more data packets to fetch).</span><div class=""><br class=""></div></div><div class="">Lixia</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">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 class=""><br class=""></div><div class="">beforeSatisfyInterest documentation:</div><div class=""><a href="http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08" target="_blank" class="">http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08</a><br class=""></div><div class=""><br class=""></div><div class="">setExpiryTimer documentation:<br class=""></div><div class=""><a href="http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a967ad88184231f79b245ce202e9d4ea7" target="_blank" class="">http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a967ad88184231f79b245ce202e9d4ea7</a><br class=""></div><div class=""><br class=""></div><div class=""><div class=""><div dir="ltr" class="m_2300554114872668597m_-5697558466934445600gmail_signature"><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">Best regards,</div><div dir="ltr" class="">Ashish Pradhan<br class=""><div style="font-size:12.8px" class=""><div style="font-size:12.8px" class=""><br class=""></div></div></div></div></div></div></div></div><br class=""></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sun, Nov 25, 2018 at 2:21 AM Xinyu Ma <<a href="mailto:bitmxy@gmail.com" target="_blank" class="">bitmxy@gmail.com</a>> wrote:<br class=""></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" class="">Hello, Pradhan<div class=""><br class=""></div><div class="">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 class="">NDN follows One-Interest-One-Data, so the PIT entry should be deleted after receiving the data.</div><div class="">You can send another Interest if you still want the PIT entry to be there.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Xinyu Ma.</div><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Nov 24, 2018, at 6:20 AM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank" class="">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="m_2300554114872668597m_-5697558466934445600m_-7572912407932601274Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Hi all,</div><div class=""><br class=""></div><div class="">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 class="">"NFD_LOG_DEBUG("beforeSatisfyInterest pitEntry=" << pitEntry->getName() <<<br class="">                " inFace=" << inFace.getId() << " data=" << data.getName());<br class=""><br class="">  this->Strategy::setExpiryTimer(pitEntry, ndn::time::milliseconds(100));"</div><div class=""><br class=""></div><div class="">Is there any thing that needs to be added?<br class=""></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Best regards,</div><div class="">Ashish Pradhan<br class=""></div><div class=""><div class=""><div dir="ltr" class="m_2300554114872668597m_-5697558466934445600m_-7572912407932601274gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><span style="font-size:12.8px" class=""></span><div style="font-size:12.8px" class=""><br class=""></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank" class="">ndnSIM@lists.cs.ucla.edu</a><br class=""><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div></div>
_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank" class="">ndnSIM@lists.cs.ucla.edu</a><br class=""><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br class=""></div></blockquote></div><br class=""></div></blockquote></div>
</div></blockquote></div><br class=""></div></blockquote></div>
_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br class=""></div></blockquote></div><br class=""></body></html>