[Nfd-dev] Review request for incoming data processing

Davide Pesavento davidepesa at gmail.com
Tue Nov 17 11:26:19 PST 2020


See https://redmine.named-data.net/issues/4290 for some background and
discussion (the first ~20 comments or so).

If I remember correctly, strategies don't have "to be prepared to
receive both" because the afterReceiveData trigger has a default
implementation that invokes beforeSatisfyInterest + sends the Data to
all valid downstreams. This was done for backward compatibility as
well as simplicity, since most strategies don't need the additional
control provided by afterReceiveData.

The current algorithm could be refined to check whether multiple
different strategies have control over the satisfied PIT entries or
it's the same strategy for all PIT entries. It's only the former case
that is problematic. This logic would be more complex to implement
though.

Davide

On Tue, Nov 17, 2020 at 1:57 PM Alex Afanasyev via Nfd-dev
<nfd-dev at lists.cs.ucla.edu> wrote:
>
> While reviewing our current implementation of the incoming data processing pipeline, I noticed a difference on how we deal with data matching a single PIT entry and multiple PIT entries.  Quite frankly, I have completely forgotten our previous discussions regarding this difference, but I'm not sure, at this time, can fully comprehend the reasoning for a difference.   The only difference, as far as I can see, is that strategy either going to receive "afterReceivedData" trigger or "beforeSatisfyInterest" trigger... yet it has to be prepare to receive both.
>
> My quick glance in strategy implementation shows:
>
> - access-strategy overrides only beforeSatisfyInterest; afterRecieveData is kept from the base class and will invoke beforeSatisfyInterest + sends data
>
> - asf-strategy the same. only beforeSatisfyInterest is implemented, leaving base class afterRetreiveData to call beforeSatisfyInterest
>
> - ncc-strategy the same
>
> - self-learning strategy (the merged code) overrides ONLY afterReceiveData. Unless I'm missing it, it basically will be failing in the case multiple PIT entries will match (intentional or a bug?)
>
> - other strategies in mainstrem NFD don't override either. Cannot say for experimental strategies in ndnSIM forks.
>
>
> My objective for this email to remember the reason why we did this and maybe re-evaluate the decision, as it doesn't look too obvious to me and potentially error prone.
>
> ______________
> Alex Afanasyev
> Assistant Professor, SCIS, Florida International University
> 11200 SW 8th Street, PG6 Room 140D, Miami, FL 33199
> phone: +1.305.348.4960 (office); email: aa at cs.fiu.edu
> web: https://users.cs.fiu.edu/~afanasyev/
>
>
> _______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev


More information about the Nfd-dev mailing list