Project

General

Profile

Actions

Task #4104

closed

Replace FibEntry with a tuple

Added by Nicholas Gordon over 7 years ago. Updated over 6 years ago.

Status:
Abandoned
Priority:
Normal
Assignee:
-
Target version:
Start date:
05/31/2017
Due date:
% Done:

0%

Estimated time:

Description

Currently the FibEntry is a class collecting pretty plain information. It is flawed in the following ways:

  1. It contains a copy of the Name, which also serves as the key to the map the Fib itself contains, wasting memory.
  2. It needlessly encapsulates the data in a way that confuses someone unfamiliar with the code.
  3. The entry is really just plain-old-data, and doesn't need any methods or functions associated with it, so the class abstraction carries too much logical overhead.
  4. The sequence number appears to be used only for debugging purposes. Not documenting it might lead a casual reader to assume that it has some other use.

Since the FIB conceptually is just a map that takes valid NDN name prefixes to a list of next-hops sorted by ascending cost, there is no need to complicate the abstraction with classes at no benefit.

Instead, the FibEntry class could be replaced with a std::tuple that contains the list of nexthops, the refresh event id, and the sequence number as elements. This preserves the mapping relationship, but also removes the need for an entire class that provides an unwieldy interface.

Actions #1

Updated by Nicholas Gordon over 7 years ago

  • Target version set to v0.4.0
Actions #2

Updated by Nicholas Gordon about 7 years ago

  • Target version changed from v0.4.0 to v0.5.0
Actions #3

Updated by Nicholas Gordon almost 7 years ago

  • Target version changed from v0.5.0 to Minor release 0.4.1
Actions #4

Updated by Ashlesh Gawande almost 7 years ago

  • Target version changed from Minor release 0.4.1 to v0.5.0
Actions #5

Updated by Nicholas Gordon over 6 years ago

  • Status changed from New to Abandoned
Actions

Also available in: Atom PDF