Project

General

Profile

Actions

Task #4127

open

Rebuild the LSDB

Added by Nicholas Gordon almost 7 years ago. Updated about 3 years 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 4 (1 open3 closed)

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 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Nicholas Gordon over 6 years ago

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

Updated by Nicholas Gordon over 6 years ago

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

Updated by Ashlesh Gawande about 6 years ago

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

Updated by Ashlesh Gawande over 5 years ago

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

Updated by Ashlesh Gawande almost 4 years 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.
Actions #7

Updated by Saurab Dulal over 3 years ago

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

Updated by Ashlesh Gawande about 3 years 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

Actions

Also available in: Atom PDF