Project

General

Profile

Actions

Feature #3979

closed

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

Added by Haitao Zhang over 7 years ago. Updated about 7 years 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 3 (1 open2 closed)

Related to ndn-cxx - Feature #3892: Integrate publishing of KeyBundle into Face::setInterestFilterAbandonedManika Mittal12/14/2016

Actions
Related to NLSR - Task #4384: Use loopback interest to serve own certificateNewMuktadir Chowdhury11/16/2017

Actions
Blocked by ndn-cxx - Feature #4228: Face: send Nack after every InterestCallback has respondedClosedJunxiao Shi08/07/2017

Actions
Actions #1

Updated by Haitao Zhang over 7 years ago

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

Updated by Haitao Zhang over 7 years ago

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

Updated by Junxiao Shi over 7 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.

Actions #4

Updated by Junxiao Shi over 7 years ago

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

Updated by Junxiao Shi over 7 years 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.

Actions #6

Updated by Junxiao Shi about 7 years ago

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

Updated by Junxiao Shi about 7 years ago

  • % Done changed from 0 to 60
Actions #8

Updated by Junxiao Shi about 7 years 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.

Actions #9

Updated by Muktadir Chowdhury about 7 years ago

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

Updated by Junxiao Shi about 7 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF