Project

General

Profile

Feature #3979

Configure Face::expressInterest to allow forward Interest to the incoming face

Added by Haitao Zhang almost 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Base
Target version:
Start date:
02/26/2017
Due date:
% Done:

100%

Estimated time:
6.00 h

Description

The feature adds new APIs to configure the behavior of Face::expressInterest: (1) set it to forward an Interest toward an InterestFilter registered on the same ndn::Face. (2) or set it not to do that.

This feature allows BundleBuilder to collect certificates by simply expressing Interests, solving #3892-16.

In general, this feature simplifies the implementation of an application if this application itself produces the data it is interested in and saves data in remote repos. Using the current Face::expressInterest, the application needs to check whether an Interest can be satisfied locally, if not, the application sends Interest to network to fetch data; or conversely. After this feature is enabled, the application could simply send Interest to face to fetch data, and has face/network decide how to fetch data.

The tasks of enabling this feature include:

  • Deciding a name for this property.
  • Implementing an API to configure (a) whether some (Interest with specific) prefixes are allowed to forward to the incoming face; (b) if allowed, forward Interest back to the same face first or send Interest to network first.

Related issues

Related to ndn-cxx - Feature #3892: Integrate publishing of KeyBundle into Face::setInterestFilterIn Progress2016-12-14

Related to NLSR - Task #4384: Use loopback interest to serve own certificateNew2017-11-16

Blocked by ndn-cxx - Feature #4228: Face: send Nack after every InterestCallback has respondedClosed2017-08-07

History

#1 Updated by Haitao Zhang almost 2 years ago

  • Related to Feature #3892: Integrate publishing of KeyBundle into Face::setInterestFilter added

#2 Updated by Haitao Zhang almost 2 years ago

  • Subject changed from Forward Interest to the incoming face to Configure Face::expressInterest to allow forward Interest to the incoming face

#3 Updated by Junxiao Shi almost 2 years ago

  • Description updated (diff)
  • Estimated time set to 6.00 h

This property should be applied per InterestFilter, not per face. ChronoSync, among others, depends on being able to send Interests to the network even if they match a local InterestFilter. At the same time, an application using ChronoSync may simultaneously export per-instance certificates to be collected by BundleBuilder.

I suggest the name "Interest loopback". This name is analogous to IP_MULTICAST_LOOP socket option.

I recommend this API:

face.setInterestFilter(
  InterestFilter("/my-app").allowLoopback(false),
  [] (const InterestFilter&, const Interest&) {});

Interest interest("/A");
interest.setTag(make_shared<InterestLoopbackTag>(true));
face.expressInterest(interest, nullptr, nullptr, nullptr);

The default on InterestFilter is allowing Interest loopback, while the default on expressInterest is disallowing Interest loopback. Having at least one default as "disallowed" avoids changing behavior of existing applications.

#4 Updated by Junxiao Shi over 1 year ago

  • Blocked by Feature #4228: Face: send Nack after every InterestCallback has responded added

#5 Updated by Junxiao Shi over 1 year ago

  • Target version set to v0.6

20170807 NFD call approves the name "Interest loopback".

It's decided that a client face shall behave like NFD's multicast strategy.
InterestFilter("/my-app").allowLoopback(false) API is needed, so that ChronoSync and the likes could disable this feature.
There's no need to have an option on expressInterest side.

When Interest loopback is enabled, even if the Interest is dispatched to one or more InterestCallbacks, it should still be sent to NFD simultaneously. In BundleBuilder's use case, in case the application itself doesn't have the certificate, the certificate may still be available elsewhere through NFD.

#6 Updated by Junxiao Shi over 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi

#7 Updated by Junxiao Shi over 1 year ago

  • % Done changed from 0 to 60

#8 Updated by Junxiao Shi over 1 year ago

  • Status changed from In Progress to Code review
  • % Done changed from 60 to 100

https://gerrit.named-data.net/4356 ChronoSync

It's sufficient to disallow Interest loopback on "sync prefix" (in logic.cpp) only.
A party does not send Interest to its own "user prefix" (in socket.cpp), so that Interest loopback can remain at the default "allowed" setting.

#9 Updated by Muktadir Chowdhury over 1 year ago

  • Related to Task #4384: Use loopback interest to serve own certificate added

#10 Updated by Junxiao Shi about 1 year ago

  • Status changed from Code review to Closed

Also available in: Atom PDF