Feature #3034
closedContentStore miss pipeline: process Link for mobility
Added by Junxiao Shi over 9 years ago. Updated about 9 years ago.
100%
Description
In ContentStore miss pipeline, process Link for mobility support.
This issue contains the minimal changes to support mobility with Link.
Cache poisoning and measurement inaccuracy problems will be solved later.
NFD Developer Guide should be updated to document this feature.
Updated by Junxiao Shi over 9 years ago
- Related to Feature #3000: Design mobility with forwarding hint added
Updated by Junxiao Shi over 9 years ago
- Blocked by Feature #3026: RouterName configuration option added
Updated by Junxiao Shi over 9 years ago
- Status changed from In Progress to Code review
- % Done changed from 50 to 100
Updated by Junxiao Shi over 9 years ago
- Blocks Feature #3074: Mobility with Link scenario added
Updated by Junxiao Shi over 9 years ago
- Blocked by deleted (Feature #3026: RouterName configuration option)
Updated by Junxiao Shi over 9 years ago
- Status changed from Code review to In Progress
- % Done changed from 100 to 50
Due to design change in #3000 note-20, I need to rework "in producer region" algorithm.
I plan to add the "region names" configuration option in the same commit. To avoid global state (as pointed out in #3049), the design is:
Forwarder
exposes asetRegionNames(const std::set<Name>&)
method, and a getter for unit testing.- Rename
nfd::general::setConfigFile
tonfd::general::processConfigFile
(to better reflect that it is stateless), and add aForwarder&
parameter to this function; this function callsforwarder.setRegionNames(..)
.
Updated by Junxiao Shi over 9 years ago
I'm looking at current Forwarder
API and I think I shouldn't introduce a setRegionNames
setter method and put matching logic inside Forwarder
, because region names are part of the forwarder's state, and state should go into a table.
I plan to add a table as follows:
class RegionSet : public std::set<Name>
{
public:
/** \brief determines whether an Interest has reached a producer region
*/
bool
isInProducerRegion(const Interest& interest) const;
};
This allows optimizations on the table without affecting Forwarder
.
This also allows future management protocol to manipulate the table, or create dataset out of the table, without requiring direct access to Forwarder
.
nfd::general::processConfigFile
will receive a reference to this table, instead of Forwarder&
.
Updated by Junxiao Shi over 9 years ago
20150817 conference call approves design in note-10.
Updated by Junxiao Shi over 9 years ago
In commit:ec82530b4e1deaf51104a87b2ea013e13bbf6821, reviewer suggests renaming RegionSet
to NetworkRegions
, with the following reasons:
"producer region" is a little bit general term. I would at least add "network" in the middle.
here there is no context and "producer region name" can mean "North America", "Los Angeles", "UCLA", "backbone", etc.call it just NetworkRegions
set is even worse, as it has suggestion that it is a set. It can be other data structure.
at least one of our tables is using plural case and for table it is expected to have plural meaning.
I agree with the first statement.
I disagree with the second statement.
It's bad to name a container as the plural form of the item it contains, because the difference between an item and a container is not obvious enough.
For example, in .NET Framework, a collection of XmlAttribute
is named XmlAttributeCollection
, and a collection of AccessControlEntry
is named AccessControlList
.
However, I agree that set
should not be used because this table is not necessarily an std::set
.
I propose the following candidate names: NetworkRegionList
, NetworkRegionTable
, ProducerRegionList
, ProducerRegionTable
.
Updated by Junxiao Shi over 9 years ago
20150821 conference call decides to call the table NetworkRegionTable
.
Updated by Junxiao Shi about 9 years ago
On commit:472726cc684d50488f0fd27e2114e274bba1928d, reviewer has pointed out that Interest::getLink
and Interest::getSelectedDelegation
can throw exceptions if the Interest packet is malformed, although the @throw
declaration of these functions indicates that they can throw only if the field is missing.
I think the solution is:
- Add the missing condition to
Interest::getLink
andInterest::getSelectedDelegation
as a@throw
declaration. - Ensure the entire Interest is well-formed, before entering any forwarding pipelines.
- To avoid the overhead of parsing
Link
multiple times whenInterest::getLink
is called multiple times, aunique_ptr<Link>
field should be stored withinInterest
class.
In item 2, it's important that the packet format validation is completed before entering any forwarding pipelines, because forwarding shouldn't process a malformed packet at all.
Partially processing a packet, only to find it malformed later and drop it later in the pipeline, is not only expensive (eg. ContentStore lookup), but also complex (eg. how to undo the PIT entry? violates NFD design goal "simplicity").
The short-term solution is: in Forwarder::onInterest
function, call Interest::getLink
and Interest::getSelectedDelegation
after checking the field exists.
The long-term solution is: in Interest::wireDecode
and Data::wireDecode
, introduce a "deep parsing" mode which parses every sub-element and ensures they are correct; NFD face system should use "deep parsing" mode.
Updated by Junxiao Shi about 9 years ago
At 20150827 conference call, Alex didn't disagree with note-15 solution, but also offered with an alternate solution:
A malformed Link
can be ignored (as if it doesn't exist) during packet processing.
I disagree with this alternate solution.
A malformed packet indicates that the sender has violated the protocol.
Attempting to serve such packets wastes network resources, and may cause security concerns.
Note that this discussion is only about a field that is recognized but malformed.
Unrecognized fields are out of scope.
Updated by Junxiao Shi about 9 years ago
20150901 conference call approves note-15 solution.
We also decide to change the return type of Interest::getLink
to const Link&
which references the Link object in unique_ptr.
Updated by Junxiao Shi about 9 years ago
- Blocked by Feature #3155: Ensure packet is well-formed before entering pipelines added
Updated by Alex Afanasyev about 9 years ago
What is the status for NetworkRegionTable management (do we have an issue for that)?
Updated by Junxiao Shi about 9 years ago
- Blocks Feature #3159: NetworkRegionTable configuration option added
Updated by Junxiao Shi about 9 years ago
- Description updated (diff)
- Status changed from In Progress to Resolved
Code is merged, but I still need to update devguide.
Updated by Junxiao Shi about 9 years ago
- Status changed from Resolved to Closed
- % Done changed from 80 to 100
devguide is updated in nfd-docs:commit:040c5bd7ef76562cbb13dec78532a27c869be08b
Updated by Junxiao Shi over 8 years ago
- Blocks Feature #3664: Incoming Nack pipeline: consider Link during FIB lookup added