[ndnSIM] How to control the Consumer behavior when an Interest times out?
alexander.afanasyev at ucla.edu
Tue Mar 12 15:20:26 PDT 2013
On Mar 12, 2013, at 3:16 PM, Chengyu Fan <chengyu at cs.colostate.edu> wrote:
> On Tue, Mar 12, 2013 at 3:33 PM, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
> Hi Chengyu,
> About your last question. I "temporarily" broke the functionality to configure Selectors (which AnswerOriginKind is part of), but it can be relatively easy added back. The main reason for this regression is that I wanted to have a packet format that incurs lesser overhead (you can check out the current packet format used by ndnSIM here: http://ndnsim.net/new-packet-formats.html). Would you have time to help me implementing this functionality?
> Let me look into it, and discuss with you latter.
> Btw. There is always an option to revert back to CCNx-compatible format (old files are in disabled/ folder), but I was planning to have an option to select packet format in the next (major) release of ndnSIM.
> Another btw. After "re-adding" the ability to set AnswerOriginKind, there is also a need to implement logic of this selector in the forwarding strategy (not currently there).
> About the fist question.
> ns3::ndn::Consumer is a very simplified implementation of the consumer and in your case you may want to implement a completely separated Consumer application (derived from ndn::App), taking the existing one as a base for the implementation. This way you going to have full control on what is happening.
> If the only functionality that you want is to send Interests and do not retransmit ones that timed out, you can try to use a consumer similar to DumbRequester from examples (examples/custom-apps/dumb-requester.h/cc): http://ndnsim.net/applications.html#dumb-requester
> I think the DumbRequester cannot figure out which Interest times out. Am I right?
Yes, it simply doesn't care if interest has been satisfied or not. So, you still need to know which one times out? You can copy relevant code from Consumer, if you still need it.
Btw, if it is just for logging purposes, then it can also be done not in the client, but in forwarding strategy (you can track timed out PIT entries, which could be almost the same).
> As for the sequence numbers. Consumer-derived apps make an assumption that you would send Interest in a specified namespace (/ucla.edu/alex/cv) with sequence numbers:
> (ConsumerZipfMandelbrot does not request sequentially, but still uses notion of sequence numbers.)
> On Mar 12, 2013, at 2:07 PM, Chengyu Fan <chengyu at cs.colostate.edu> wrote:
>> Sorry, here is another question: Can I set the AnswerOriginKind bit in ndnSIM?
>> On Tue, Mar 12, 2013 at 2:56 PM, Chengyu Fan <chengyu at cs.colostate.edu> wrote:
>> Hi Alex,
>> I want to control the Consumer behavior when an Interest times out: when an Interest times out, the consumer must ignore it, and send another Interest.
>> I did not find an example which does the similar thing. But I notice that ns3::ndn::Consumer Class can handle the time out, do I need to write my class to inherit it?
>> And I don't understand the method OnTimeout (uint32_t sequenceNumber), what does the parameter sequenceNumber mean?
>> For example, if I send Interest for content /ucla.edu/alex/cv, and it times out, what kind of sequenceNumber is?
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM