Feature #4055
closedForwarding hint: represented as name only
100%
Description
Change Interest type so that forwarding hint is represented as delegation names only, instead of full Link object.
Change forwarding pipelines accordingly.
Updated by Junxiao Shi over 8 years ago
- Related to Feature #3000: Design mobility with forwarding hint added
Updated by Junxiao Shi over 8 years ago
- Blocked by Feature #4054: Forwarding hint: represented as name only added
Updated by Junxiao Shi over 8 years ago
- Blocks Feature #4056: Allow strategy to choose delegation name from forwarding hint added
Updated by Junxiao Shi over 8 years ago
- Status changed from New to In Progress
- Assignee set to Junxiao Shi
- Target version set to v0.6
Updated by Junxiao Shi over 8 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.
Updated by Junxiao Shi over 8 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.
Updated by Junxiao Shi over 8 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.
Updated by Junxiao Shi over 8 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:
Linkconstructor 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.
Updated by Junxiao Shi over 8 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.
Updated by Junxiao Shi over 8 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:
hasLinkalways returns false.getLinkalways throwsInterest::Error.setLinkstores the delegations as ForwardingHint.unsetLinkclears 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.
Updated by Junxiao Shi over 8 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.
Updated by Junxiao Shi over 8 years ago
- Related to Feature #4185: Wireshark dissector: recognize ForwardingHint field added
Updated by Junxiao Shi over 8 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.
Updated by Junxiao Shi about 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 80 to 100
nfd-docs:commit:ec8a9d4f48e370903e7b01dffbaf2e312f2fd324
Updated by Junxiao Shi about 8 years ago
- Status changed from Resolved to Closed