Project

General

Profile

Actions

Task #2883

closed

NDNLPv2 design: NACK in client Face

Added by Junxiao Shi almost 9 years ago. Updated over 8 years ago.

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

100%

Estimated time:
3.00 h

Description

Design how NDNLPv2 Network NACK (ndn::lp::Nack) should be processed in ndn::Face.


Related issues 3 (0 open3 closed)

Related to NFD - Task #2763: NDNLPv2: NACK, Fragmentation, NextHopFaceId, CachePolicy, IncomingFaceIdClosedJunxiao Shi

Actions
Blocks ndn-cxx - Feature #2930: Face: send and receive NACKClosedEric Newberry

Actions
Blocked by ndn-cxx - Task #1372: Replace usages of deadline_timer with Scheduler-based eventsClosedAlex Afanasyev

Actions
Actions #1

Updated by Junxiao Shi almost 9 years ago

  • Related to Task #2763: NDNLPv2: NACK, Fragmentation, NextHopFaceId, CachePolicy, IncomingFaceId added
Actions #2

Updated by Junxiao Shi almost 9 years ago

  • Subject changed from Face: Network NACK design to NDNLPv2 design: NACK in client Face
  • Status changed from New to In Progress
Actions #3

Updated by Junxiao Shi almost 9 years ago

  • Description updated (diff)
  • % Done changed from 0 to 20
Actions #4

Updated by Junxiao Shi almost 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 20 to 100
Actions #5

Updated by Junxiao Shi almost 9 years ago

20150617 conference call reviewed revision 565e09af25b894d45ad5ff2e576ed2864c5371ae.
Comments are:

  • DataCallback NackCallback TimeoutCallback should have const Interest& interest parameter.
    • Semantically, Interest and Data/Nack/timeout form a pair.
    • In implementation, the Interest is stored in the PIT, so there's no additional cost to pass it to the callback.
  • put shouldn't require shared_ptr. Instead, it should take const Nack& and always make a copy (so that caller doesn't need to keep the Nack unchanged.
Actions #7

Updated by Alex Afanasyev almost 9 years ago

Agreed

Actions #8

Updated by Junxiao Shi almost 9 years ago

  • Status changed from Resolved to Closed

20150619 conference call approves the design.

Actions #9

Updated by Junxiao Shi almost 9 years ago

Actions #10

Updated by Junxiao Shi almost 9 years ago

  • Blocked by Task #1372: Replace usages of deadline_timer with Scheduler-based events added
Actions #11

Updated by Junxiao Shi almost 9 years ago

  • Status changed from Closed to Feedback

Reopening because #1372 adds Scheduler and deleter to PendingInterest struct, so this design needs to be updated accordingly.

Actions #13

Updated by Eric Newberry over 8 years ago

How does the deprecated expressInterest() still work if PendingInterest and FaceImpl are both modified to only work with the new API?

Actions #14

Updated by Junxiao Shi over 8 years ago

Answer to note-13:

const PendingInterestId*
Face::expressInterest(const Interest& interest,
                      const OnData& onData,
                      const OnTimeout& onTimeout)
{
  return this->expressInterest(
    interest,
    [onData] (const Interest& interest, const Data& data) {
      if (onData != nullptr) {
        onData(interest, const_cast<Data&>(data));
      }
    },
    bind([]{}),
    onTimeout
  );
}
Actions

Also available in: Atom PDF