[ndnSIM] afterReceiveInterest in Strategy subclass

John Baugh jpbaugh at umich.edu
Sat May 13 13:50:11 PDT 2017


Obviously this question is open to anyone who wants to chime in.

On May 13, 2017 2:33 PM, "John Baugh" <jpbaugh at umich.edu> wrote:

> Junxiao,
>
> So, if I want to gather information about ALL incoming interests in order
> to maintain data about them, what must I do?
>
> Do I subclass the Forwarder class?  If so, how do I ensure that my new
> Forwarder subclass is used?  And, would this require subclassing the
> Strategy class as well?
>
> Thanks,
>
> John
>
> On May 13, 2017 1:33 PM, "Junxiao Shi" <shijunxiao at email.arizona.edu>
> wrote:
>
>> Hi John
>>
>> The truth is in source code. Any documentation is secondary: they could
>> be outdated, or they could reflect a planned feature/change which is not
>> yet implement.
>>
>> In this instance, NFD devguide is correct. Strategy's *after receive
>> Interest* trigger is invoked only if the Interest is not satisfied by
>> ContentStore.
>>
>> NFD's *Forwarder::onIncomingInterest* function is invoked for every
>> incoming Interest. That function, at the end, performs a CS lookup, and
>> branches out to two cases: CS hit or CS miss.
>>
>> Yours, Junxiao
>>
>> On May 12, 2017 11:01 PM, "John Baugh" <jpbaugh at umich.edu> wrote:
>>
>> Greetings ndnSIM folks,
>>
>> I have been working with a Strategy subclass in order to take advantage
>> of the afterReceiveInterest method.  The documentation on ndnSIM's website
>> seems to imply that *any time *an Interest arrives at a node, that
>> afterReceiveInterest is called.
>>
>> However, the *NFD Documentation *seems to imply that this method is only
>> called *if the Content Store cannot satisfy the Interest.*  In other
>> words, if the Interest is satisfied by the CS, this method will not be
>> invoked.
>>
>> 1.  Can someone tell me which of these is true?
>>
>> 2.  Is there any method in any class that is invoked *ANY TIME *an
>> Interest arrives (whether or not the CS can satisfy it or for any other
>> reason)?
>>
>>
>> Thanks,
>>
>> John
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170513/1366c5a0/attachment.html>


More information about the ndnSIM mailing list