Project

General

Profile

Actions

Feature #4055

closed

Forwarding hint: represented as name only

Added by Junxiao Shi about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Forwarding
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
9.00 h

Description

Change Interest type so that forwarding hint is represented as delegation names only, instead of full Link object.
Change forwarding pipelines accordingly.


Related issues 4 (2 open2 closed)

Related to NFD - Feature #3000: Design mobility with forwarding hintFeedback

Actions
Related to ndn-tools - Feature #4185: Wireshark dissector: recognize ForwardingHint fieldClosedDavide Pesavento

Actions
Blocked by NDN Specifications - Feature #4054: Forwarding hint: represented as name onlyClosedJunxiao Shi04/19/2017

Actions
Blocks NFD - Feature #4056: Allow strategy to choose delegation name from forwarding hintNew

Actions
Actions #1

Updated by Junxiao Shi about 7 years ago

  • Related to Feature #3000: Design mobility with forwarding hint added
Actions #2

Updated by Junxiao Shi about 7 years ago

  • Blocked by Feature #4054: Forwarding hint: represented as name only added
Actions #3

Updated by Junxiao Shi about 7 years ago

  • Blocks Feature #4056: Allow strategy to choose delegation name from forwarding hint added
Actions #4

Updated by Junxiao Shi almost 7 years ago

  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi
  • Target version set to v0.6
Actions #5

Updated by Junxiao Shi almost 7 years ago

  • % Done changed from 0 to 20
  • Estimated time changed from 3.00 h to 9.00 h

https://gerrit.named-data.net/3933 introduces Delegation and DelegationList structs, to be shared between ForwardingHint and LinkContent.

Actions #6

Updated by Junxiao Shi almost 7 years ago

  • % Done changed from 20 to 30

https://gerrit.named-data.net/3972 simplifies Link with DelegationList. Since DelegationList can be unsorted, Link::getDelegationFromWire and similar methods are now deprecated. They won't be needed anyway after Interest has been converted from carrying Link to carrying forwarding hint.

Actions #7

Updated by Junxiao Shi almost 7 years ago

There's an unexpected behavior change: if an Interest contains invalid Link object and valid SelectedDelegation field, Interest::wireDecode will throw. Previously, only Interest::getLink throws because (now deprecated) Link::countDelegationsFromWire only performs a partial parsing of the Link object and happens to accept the invalid Link objects used in the test cases.
This detail is unimportant because SelectedDelegation will be deprecated under this issue.
https://gerrit.named-data.net/3972 patchset2 deletes SelectedDelegation field in affected test cases.

Actions #8

Updated by Junxiao Shi almost 7 years ago

  • % Done changed from 30 to 40

https://gerrit.named-data.net/3993 adds ForwardingHint field to Interest.

Previously, the Link object in Interest was stored as a Block, and decoded only when requested. The reasons were:

  • Link constructor always sorts the delegations, which can make SelectedDelegation field point to wrong delegation.
  • Not every node needs to see the delegations, so Link can be decoded lazily.

DelegationList can be constructed as unsorted, so the first reason no longer applies.

It's true that not every node needs to see the delegations. An Interest with a Link object or forwarding hint traverses consumer region, the backbone and then producer region. Only backbone nodes (including edge routers of consumer region and producer region) need to see the delegations.
But in reality, NFD implementation always decodes the Link object, because it's a lot worse to find the Interest to be malformed in the middle of processing, than wasting some processing power to decode the field. The waste is only in consumer region, because Link object is stripped when entering producer region as of #3893.

Therefore, I choose to always decode ForwardingHint field.

Actions #9

Updated by Junxiao Shi almost 7 years ago

https://gerrit.named-data.net/3999 reorganizes interest.cpp code and deletes duplicate tests for malformed Link objects.

https://gerrit.named-data.net/3993 encodes and decodes ForwardingHint field in Interest.

https://gerrit.named-data.net/4000 adds Interest::modifyForwardingHint method which allows a callback to modify ForwardingHint field in-place without copying.

Actions #10

Updated by Junxiao Shi almost 7 years ago

Upcoming plan for this issue:

Change NFD forwarding to use ForwardingHint only. Link and SelectedDelegation are ignored but do not cause errors.

Deprecate Interest::*Link:

  • hasLink always returns false.
  • getLink always throws Interest::Error.
  • setLink stores the delegations as ForwardingHint.
  • unsetLink clears the ForwardingHint.

Remove Interest::*SelectedDelegation as it's only used by NFD.

Interest::wireEncode no longer emits Link and SelectedDelegation fields.

Interest::wireDecode interprets Link and SelectedDelegation fields as ForwardingHint. If SelectedDelegation is omitted, all delegations are stored as ForwardingHint. If SelectedDelegation is present, the selected delegation is stored as ForwardingHint. A packet with both Link and ForwardingHint fields is considered malformed.

Actions #11

Updated by Junxiao Shi almost 7 years ago

  • % Done changed from 40 to 60

https://gerrit.named-data.net/4024 has all NFD changes. NFD now completely ignores Interest::getLink and only processes forwarding hint.

https://gerrit.named-data.net/4023 adds bool DelegationList::empty() which would simplify NFD code, because !interest.getForwardingHint().empty() looks better than interest.getForwardingHint().size() > 0. I'll update Change 4024 once this is merged.

Actions #12

Updated by Junxiao Shi almost 7 years ago

  • Related to Feature #4185: Wireshark dissector: recognize ForwardingHint field added
Actions #13

Updated by Junxiao Shi over 6 years ago

  • % Done changed from 60 to 80

https://gerrit.named-data.net/4067 deletes Interest::getLink Interest::getSelectedDelegation and similar methods.
Although I proposed a non-breaking change path in note-10, I feel it unnecessary given the infrequent use of Link object in existing code, thus I decide to make a breaking change instead.

https://gerrit.named-data.net/4068 updates ndnpeek program to interpret --link-file as ForwardingHint, similar to note-10 approach.
It will be replaced with a command line argument for forwarding hint in #4207.

Remaining work is to update NFD devguide.

Actions #14

Updated by Junxiao Shi over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 80 to 100

nfd-docs:commit:ec8a9d4f48e370903e7b01dffbaf2e312f2fd324

Actions #15

Updated by Junxiao Shi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF