[ndnSIM] Access outgoing data pipeline from strategy

Rakesh Ranjan Jha rakeshranjan.jha at gmail.com
Wed Jul 12 14:16:40 PDT 2017


Hi Junxiao,
Thanks for helping!
However, I'm not sure how it is in violation of guideline.

Let me try to cite a scenario:
If the forwarding strategy finds queue on a particular outgoing data face
is congested and it wants to defer the forwarding to a later time (say next
data packet arrival for same face or a timer which ever occurs first).
Also note here that data is any way stored in content store so all the
strategy wants is an opportune time to re-play this data fetching it from
content store (before PIT expiry or fulfillment by any other node).

So, in this scenario strategy is not introducing a new type of packet nor
is it wanting to disable content store, it just wishes to use the
forwarder's interface and utilities (CS handle) at a later time.
Modifying the forwarder or forwarding pipeline for this case may either
pollute the space for all strategy not wanting to achieve this and/or
unnecessarily bloat up the common functionality (could also be possibly
hackish depending how much change we are willing to do).

Also, I'm still puzzled that in my implementation why accessing content
store via forwarder's reference (with my strategy being friend) is not
compiling when a similar mechanism in forwarder doesn't give any complaints
and it would be great if you could give your valuable input in this regard.

Thanks,
Rakesh

On Wed, Jul 12, 2017 at 4:49 PM, Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Hi Rakesh
>
> Strategy is not the right place to implement this feature.
> As indicated in NFD devguide “Should I Develop a New Strategy” section:
>
> The only purpose of the strategy is to decides how to forward Interests
> and cannot override any processing steps in the forwarding pipelines. If it
> is desired to support a new packet type (other than Interest and Data), a
> new field in Interest or Data packets, or override some actions in the
> pipelines (e.g., disable ContentStore lookup), it can be only accomplished
> by modification of the forwarding pipelines.
>
> Strategy has no access to the Content Store, and strategy cannot inject or
> intercept any Data packet.
>
> You should implement this feature by modifying forwarding pipelines
> instead.
>
> Yours, Junxiao
>
> PS: I’m on this list. No need to summon me by CCing. I initially ignored
> this question because it’s already explained in NFD devguide.
>
>
> On Jul 9, 2017, at 10:30 AM, Rakesh Ranjan Jha <rakeshranjan.jha at gmail.com>
> wrote:
>
> I'm trying to spontaneously inject a cached data (based on a previously
> unfulfilled interest present in PIT and so I have an interest handle to
> fetch data) from content store.
>
> 1) Derived strategy doesn't seem to have any handle to fowarder although
> base strategy has a handle and is friend to forwarder to access pipelines.
> In order to workaround this I added my strategy also as a friend and gave
> it a reference to forwarder, similar to base strategy. Is there a better
> way to access pipeline from strategy?
>
> 2) To access data from CS and feed it to outgoing data pipeline, I follow
> similar mechanism as done on receiving valid interest from forwarder:
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170712/dd674e71/attachment.html>


More information about the ndnSIM mailing list