[Nfd-dev] [EXT]Re: Review request for incoming data processing

Teng Liang philoliang at email.arizona.edu
Wed Nov 18 01:36:55 PST 2020


On Wed, Nov 18, 2020 at 3:32 AM Alex Afanasyev via Nfd-dev <
nfd-dev at lists.cs.ucla.edu> wrote:

> *External Email*
>
>
> On Nov 17, 2020, at 2:26 PM, Davide Pesavento <davidepesa at gmail.com>
> wrote:
>
> 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.
>
>
> Yeah, I forgot to delete this part.  Yet still, you cannot override just
> afterReceiveData, as it will not be always called.
>
> My kind of meta question is why not just have one branch and only have
> beforeSatisfyInterest trigger? Why both?   But will check the referenced
> redmine comments in case it already has an answer.
>

We wanted to add a trigger that gives strategies full control over Data. To
avoid multiple strategies manipulating the same Data, this trigger has to
meet one condition that only one PIT entry is matched. Following this logic
with minimal code changes, we implemented it in the current way:
*afterReceiveData
*is added to allow strategies to manipulate Data, but will not alway be
triggered; *beforeSatisfyInterest *allows strategies to make measurements
as it was designed for.

Merging two triggers into one trigger looks more readable and clean to me.
One concern is that those strategies who want to manipulate Data have to
avoid the case when multiple PIT entries are matched in their overridden
implementations, which is a very very rare case though (and can be avoided
in configuration).

Maybe one lesson can be learned is that we considered too many corner cases
when making implementation designs.

Teng



>
> -
> Alex
>
> 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 <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
>
>
> ______________
> 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 <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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20201118/60d323b2/attachment.html>


More information about the Nfd-dev mailing list