Project

General

Profile

Task #4127

Rebuild the LSDB

Added by Nicholas Gordon over 3 years ago. Updated about 1 month ago.

Status:
In Progress
Priority:
Normal
Target version:
Start date:
08/09/2017
Due date:
% Done:

66%

Estimated time:
(Total: 0.00 h)

Description

The LSDB is verbose and repetitive, and it can be better designed to be more concise and readable.


Files

list-sort-set-benchmark.cpp (898 Bytes) list-sort-set-benchmark.cpp Junxiao Shi, 01/23/2018 09:17 AM

Subtasks

Task #4235: Simplify LSDB Dataset Interest Handler and LSA PublisherClosedNicholas Gordon08/09/2017

Actions
Task #4264: Increase independence of SyncLogicHandler.Closed

Actions
Task #4335: SyncLogicHandler should use an "oracle" funciton to determine LSA newnessRejectedNicholas Gordon

Actions
Task #4620: Update NLSR Developer's guide to reflect re-built LSDB.New

Actions

Related issues

Blocked by NLSR - Task #2741: Create proposal to redesign a more generic LSDBClosedMuktadir Chowdhury08/09/2017

Actions
#1

Updated by Nicholas Gordon about 3 years ago

  • Target version changed from v0.5.0 to Minor release 0.4.1
  • Parent task deleted (#2741)
#2

Updated by Nicholas Gordon about 3 years ago

  • Blocked by Task #2741: Create proposal to redesign a more generic LSDB added
#4

Updated by Ashlesh Gawande about 3 years ago

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

Updated by Ashlesh Gawande about 2 years ago

  • Assignee changed from Nicholas Gordon to Saurab Dulal
  • Target version changed from v0.5.0 to v0.6.0
#6

Updated by Ashlesh Gawande 9 months ago

  • Assignee changed from Saurab Dulal to Ashlesh Gawande

https://gerrit.named-data.net/c/NLSR/+/4749 patch-set 11 makes minimum changes to replace the three std::list used for Lsas with the proposed boost::multi_index container in previous patch-sets. Although it does not separate LsaFetcher and LsaPublisher as the previous patch-sets, it still reduces the Lsdb from ~1300 lines to ~630 lines with templating and polymorphism. Changes outside the Lsdb are kept to a minimum for easier review and have all the tests be passed w/ minimum modifications.
Other refactoring can follow as desired after the basic premise of this change of using a single multi_index container for Lsdb is achieved.

Some highlights that may need explicit review:

  • Block m_wire is eliminated from child LSA classes and now resides in LSA base class (replacing the m_baseWire). These were introduced in #4787
  • LSA base class has a public pure virtual wireEncode() - this maybe not desired in a library, but I think having it in NLSR is perfectly fine. wireEncode(block) and wireDecode(block) are protected, to be used by child classes.
#7

Updated by Saurab Dulal 2 months ago

  • Target version changed from v0.6.0 to 0.7.0
#8

Updated by Ashlesh Gawande about 1 month ago

https://gerrit.named-data.net/c/NLSR/+/6217 makes the following changes to simplify Lsdb further:

  • Lsdb emits a signal containing a pointer to Lsa, an update type (Inserted, Updated, Removed), and two lists of Names
    • List of Names are only relevant to NameLsa update - Names to be removed and Names to be added.
    • Lsa base class now has a pure virtual update function so that Lsdb does not need to cast the pointer and then call functions according to each Lsa
  • RoutingTable consumes the Lsdb signal
    • Behaviours which were in Lsdb such as removing routing table if own Adjacency Lsa is removed are moved to RoutingTable
    • Resets wire when routing table is updated (seems like current code does not - so will return old routing table once calculated)
    • calculate function in RoutingTable is simplified
  • NamePrefixTable consumes the Lsdb signal
    • Adds/Removes origin router of LSAs
    • Adds/Removes updates from NameLsa

Unit tests are added to test that the behavior upon signal emission/consumption is correct in Lsdb, RoutingTable and NamePrefixTable

Also available in: Atom PDF