https://redmine.named-data.net/https://redmine.named-data.net/favicon.ico?14759811232014-12-19T19:10:43ZNDN project issue tracking systemNFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=68862014-12-19T19:10:43ZJunxiao Shi
<ul><li><strong>Blocks</strong> <i><a class="issue tracker-2 status-5 priority-2 priority-default closed" href="/issues/1999">Feature #1999</a>: Strategy for access router</i> added</li></ul> NFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=68932014-12-19T20:55:53ZJunxiao Shi
<ul><li><strong>Subject</strong> changed from <i>Measurements::findLongestPrefixMatch(pit::Entr) and MeasurementsAccessor::findLongestPrefixMatch</i> to <i>Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatch</i></li><li><strong>Estimated time</strong> changed from <i>2.00 h</i> to <i>1.50 h</i></li></ul><p>One related question: sometimes strategy needs to find a longest prefix match that satisfy certain condition, such as the existence of a certain type of <code>StrategyInfo</code>.</p>
<p>Which design is better?</p>
<ul>
<li>add a <code>predicate</code> parameter to <code>findLongestPrefixMatch</code> functions</li>
<li>add <code>findLongestPrefixMatch(const measurements::Entry&)</code> overload; if the strategy thinks the initial match doesn't satisfy the requirement, it could call this overload to find a longest prefix match of the parent of passed Entry</li>
</ul>
<p>The first design is cleaner, but it's hard to pass information from the predicate to the caller.<br><br>
For example, if the predicate calls <code>getStrategyInfo<T></code>, the caller (who calls <code>findLongestPrefixMatch</code>) will have to call <code>getStrategyInfo<T></code> again.</p>
NFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=71462015-01-07T13:30:15ZJunxiao Shi
<ul></ul><p>20150107 conference call decides to use the first design in note-2. Alex hopes the common expression will be optimized by compiler.</p>
NFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=71522015-01-07T14:23:32ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> NFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=71572015-01-07T14:47:23ZJunxiao Shi
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>50</i></li></ul><p><a href="http://gerrit.named-data.net/1600">http://gerrit.named-data.net/1600</a> accepts predicate in <code>Measurements::findLongestPrefixMatch</code>.</p>
<p>The next commit will expose <code>findLongestPrefixMatch</code> operation to <code>MeasurementsAccessor</code>.</p>
NFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=71652015-01-08T08:21:38ZJunxiao Shi
<ul><li><strong>% Done</strong> changed from <i>50</i> to <i>70</i></li></ul><p><a href="http://gerrit.named-data.net/1606">http://gerrit.named-data.net/1606</a> adds <code>findLongestPrefixMatch</code> and <code>findExactMatch</code> to <code>MeasurementsAccessor</code>.</p>
<p>However, I realize that I forgot to add <code>Measurements::findLongestPrefixMatch(pit::Entry)</code>, which shall come before this Change.</p>
NFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=71662015-01-08T08:37:09ZJunxiao Shi
<ul><li><strong>% Done</strong> changed from <i>70</i> to <i>90</i></li></ul><p><a href="http://gerrit.named-data.net/1607">http://gerrit.named-data.net/1607</a> adds <code>Measurements::findLongestPrefixMatch(pit::Entry)</code>.</p>
NFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=71692015-01-08T15:31:43ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Code review</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul> NFD - Feature #2314: Measurements::findLongestPrefixMatch(pit::Entry) and MeasurementsAccessor::findLongestPrefixMatchhttps://redmine.named-data.net/issues/2314?journal_id=71982015-01-09T19:26:55ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>Closed</i></li></ul>