[Nfd-dev] beforeExpirePendingInterest for forwarding strategy

Junxiao Shi shijunxiao at email.arizona.edu
Tue Aug 25 15:44:46 PDT 2015


Hi Navdeep

I tried a scenario similar to this.
I have NFD configured as default, except that loglevel for
Forwarder,Strategy,BestRouteStrategy2 are set to DEBUG.

In the first experiment, I execute `ndnpeek /A` on the console and wait for
it to timeout.
The log lines related to this Interest are:
1440541933.178175 DEBUG: [Forwarder] onIncomingInterest face=261 interest=/A
1440541933.178432 DEBUG: [Forwarder] onContentStoreMiss interest=/A
1440541933.178521 DEBUG: [BestRouteStrategy2] /A?ndn.Nonce=294193691
from=261 noNextHop
1440541933.178585 DEBUG: [Forwarder] onInterestReject interest=/A
1440541933.279071 DEBUG: [Forwarder] onInterestFinalize interest=/A
unsatisfied

In the second experiment, I execute `nfdc register /A tcp4://
spurs.cs.ucla.edu` to create a route toward the prefix, then execute
`ndnpeek /A` and wait for timeout.
The log lines related to this Interest are:
1440542132.989179 DEBUG: [Forwarder] onIncomingInterest face=263 interest=/A
1440542132.989297 DEBUG: [Forwarder] onContentStoreMiss interest=/A
1440542132.989376 DEBUG: [Forwarder] onOutgoingInterest face=262 interest=/A
1440542132.989576 DEBUG: [BestRouteStrategy2] /A?ndn.Nonce=2926069994
from=263 newPitEntry-to=262
1440542136.991586 DEBUG: [Forwarder] onInterestUnsatisfied interest=/A
1440542136.991624 DEBUG: [Strategy] beforeExpirePendingInterest pitEntry=/A
1440542136.991649 DEBUG: [Forwarder] onInterestFinalize interest=/A
unsatisfied

We can see that the "before expire Interest" trigger is triggered only if
the Interest has been forwarded but no Data comes back; it's not triggered
if Interest was not forwarded / rejected (in BestRouteStrategy2 it's due to
lack of FIB entry).

Not triggering the "before expire Interest" trigger in the first case is a
reasonable behavior, because the rejection of this Interest is directly
caused by the strategy itself: the strategy is triggered for "after receive
Interest" and decides not to forward the Interest, so that forwarding
enters the Interest reject pipeline and then finalizes the Interest after
the straggler timer. In this situation, the strategy could do whatever it
wants within the "after receive Interest" trigger.
In the second case, the "before expire Interest" trigger would inform
strategy about an expiring PIT entry, because the unsatisfied Interest is
not caused by the strategy: the strategy has forwarded the Interest
somewhere, and it should be triggered when Data comes back (in "before
satisfy Interest" trigger) or when nothing comes back (in "before expire
Interest" trigger).

Yours, Junxiao

On Thu, Aug 20, 2015 at 5:44 AM, Navdeep Uniyal <navdeep.uniyal at neclab.eu>
wrote:

> Hi Junxiao,
>
>
>
> Below are the client and server configuration which I am using. As none of
> the files held by server matches with interest, all requests are getting
> timed out. While overriding the method, currently I am just trying to check
> if it works, may be later I will include more code as per the requirement.
>
>
>
>
>
>
>
> Client conf:
>
>
>
> ##########
>
> TrafficPercentage=100
>
> Name=/ndn/nle/file
>
> ExpectedContent=AAAAAAAA
>
> ##########
>
>
>
>
>
> Server Conf:
>
>
>
> ##########
>
> Name=/ndn/nle/file1
>
> Content=AAAAAAAA
>
> ContentBytes=5000
>
> ##########
>
> Name=/ndn/nle/file2
>
> Content=AAAAAAAB
>
> ContentBytes=5000
>
> ##########
>
> Name=/ndn/nle/file3
>
> Content=AAAAAAAC
>
> ContentBytes=5000
>
> ##########
>
> Name=/ndn/nle/file6
>
> Content=AAAAAAAF
>
> ContentBytes=5000
>
> ##########
>
>
>
>
>
> Method:
>
>
>
> void
>
> WeightedLoadBalancerStrategy::beforeExpirePendingInterest(shared_ptr<pit::Entry>
> pitEntry)
>
>    {
>
>           NFD_LOG_TRACE("Entering
> beforeExpirePendingInterest"<<pitEntry->getName());
>
>    }
>
>
>
>
>
>
>
>
>
> Best Regards,
>
> Navdeep Uniyal
>
>
>
> *From:* Junxiao Shi [mailto:shijunxiao at email.arizona.edu]
> *Sent:* Donnerstag, 20. August 2015 14:36
> *To:* Navdeep Uniyal; Steve DiBenedetto
> *Cc:* nfd-dev at lists.cs.ucla.edu
> *Subject:* RE: [Nfd-dev] beforeExpirePendingInterest for forwarding
> strategy
>
>
>
> Hi Navdeep
>
>
>
> beforeExpirePendingInterest should be triggered when PIT entry is
> *unsatisfied* after InterestLifetime.
>
> If you find it’s not triggered, give more details of your setup including
> the topology and the configuration files of traffic generator server and
> client.
>
>
>
> Yours, Junxiao
>
>
>
>
> *From: *Navdeep Uniyal
> *Sent: *Thursday, August 20, 2015 05:15
> *To: *Steve DiBenedetto
> *Cc: *nfd-dev at lists.cs.ucla.edu
> *Subject: *Re: [Nfd-dev] beforeExpirePendingInterest for forwarding
> strategy
>
>
>
>
>
> Hi Steve,
>
>
>
> Thank you for your reply. I have a doubt regarding the triggering of this
> event. I am using Ndn Traffic Generator for testing my strategy. I am
> overriding this method “beforeExpirePendingInterest” just to get some log
> trace. But I am unable to see anything in the logs. As per my
> understanding, for all the timed out interests this method should be
> triggered. Please if you can suggest what could be the potential issue for
> the method to be not logging anything for the timed out  interest messages.
>
>
>
>
>
> Best Regards,
>
> Navdeep Uniyal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20150825/c2d4dbaa/attachment.html>


More information about the Nfd-dev mailing list