Project

General

Profile

Actions

Task #4482

closed

Refactor LsaSegmentStorage

Added by Muktadir Chowdhury about 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The way LsaSegmentStorage has been implemented is inefficient for deleting LSA segments that belongs to the same Data packet. Currently each LSA segments is a separate element in a std::unorederd_map where segment name is the key. So if we need to delete LSA segments of a same LSA Data, then we need to walkthrough the map to find those segments one by one which is in O(n).

Instead we can do the following:
(1) Have a class called LsaData, which has member variable Seq No and a list of lsa segments, .e.g std::vectorndn::Data
(2) Have another class called LsaSegmentStorage, which have a hashmap of LsaData indexed by LsaKeyName (///), e.g. std:unordered_map
Each element in the container represents a list of segments that belongs to the same LSA Data.

Actions #1

Updated by Muktadir Chowdhury about 6 years ago

Davide suggested to explore the possibility of using InMemoryStorage from ndn-cxx.
Alex replied it is possible but we need to write a custom policy for removing an element from the InMemoryStorage.

Actions #2

Updated by Ashlesh Gawande almost 4 years ago

  • Status changed from New to Closed
  • Start date deleted (01/31/2018)

Completed in #4788.

Actions

Also available in: Atom PDF