[Nfd-dev] strategy specific parameters

Klaus Schneider klaus.schneider at uni-bamberg.de
Tue Apr 14 13:59:55 PDT 2015


Hi Junxiao and Alex,

Thank you for your elaborate answer. Using parameters as part of the 
strategy name is an interesting concept.

> Another way of specializing strategies is to define a parameters as part of strategy name.  For example,
>
> ndn:/localhost/nfd/strategy/broadcast/%FD%01/?param=false
>

Is it possible to access this parameter inside the strategy when using 
ndnSim?

In my simulation file I added a parameter:

> ndn::StrategyChoiceHelper::Install(client, "/",
>       "/localhost/nfd/strategy/somestrategy/%FD%01/?param=true");

However, none of the following two variables shows the correct parameter 
inside the strategy constructor:

> StrategyChoice& strategyChoice = forwarder.getStrategyChoice();
>   Strategy& str = strategyChoice.findEffectiveStrategy("/");
>
>   std::cout << "Name: " << str.getName() << ", " << name << "\n";

Is there another way to access the parameter?

Regarding the duplicate nonce loops: I think this is not a problem when 
the client who uses the broadcast strategy is not a source for the 
requested content. If no routes go back to the client (which is the 
scenario I had in mind), then to my understanding the Interest packets 
can't loop.

Even if this won't get implemented, I think it's a good example how 
parameters can help to avoid creating a new strategy for a change of one 
line of code.

Thanks,
Klaus





On 14.04.2015 01:10, Junxiao Shi wrote:
> Hi Klaus
>
> 20150413 conference call discussed this proposal.
>
> This proposal is a subset of #2000 composable strategy building blocks
> <http://redmine.named-data.net/issues/2000>.
> With #2000, an operator can not only pass parameters to a strategy, but
> also create new strategies. Both can happen at runtime.
> Passing parameters is just a special case of creating new strategies: take
> an existing strategy, and give it new parameters.
>
>
> I believe having strategy parameters is a good direction toward #2000.
> I agree with Alex that parameters should be carried in the Name after the
> version component, at the management protocol
> <http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice> level.
> At command line tool level, however, I prefer to accept ccndc syntax as
> well: operator can either specify parameters as part of the strategy Name,
> or in separate command line options.
>
>
> I disagree with the use case that broadcast strategy generates new Nonces
> for outgoing Interests, because it can cause persistent Interest loop in #1953
> scenario <http://redmine.named-data.net/issues/1953>.
>
> Yours, Junxiao
>
> On Sun, Apr 12, 2015 at 6:23 AM, Klaus Schneider <
> klaus.schneider at uni-bamberg.de> wrote:
>
>> Hi everyone,
>>
>> I think it would be a good idea to have (optional) parameters for a
>> forwarding strategy in order to make the design more flexible.
>>
>> The CCNx prototype supports this:
>>
>>   ccndc setstrategy <prefix> <strategy> [<parameters> [<lifetime>]]
>>>
>>
>> Unfortunately, there is currently no such option in NFD:
>>
>>   nfdc set-strategy <namespace> <strategy-name>
>>>
>>
>>
>> If you think this is reasonable, I can help with the implementation. I am
>> also not sure if this is the right place for such feature requests or if I
>> should put them up as a redmine ticket?
>>
>> Thanks,
>> Klaus
>

-- 
Klaus Schneider

Mail: klaus.schneider at uni-bamberg.de
LinkedIn: https://www.linkedin.com/in/schneiderklaus



More information about the Nfd-dev mailing list