Project

General

Profile

Task #2883

NDNLPv2 design: NACK in client Face

Added by Junxiao Shi over 4 years ago. Updated about 4 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

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

Blocks ndn-cxx - Feature #2930: Face: send and receive NACKClosed

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

History

#1 Updated by Junxiao Shi over 4 years ago

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

#2 Updated by Junxiao Shi over 4 years ago

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

#3 Updated by Junxiao Shi over 4 years ago

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

#4 Updated by Junxiao Shi over 4 years ago

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

#5 Updated by Junxiao Shi over 4 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.

#7 Updated by Alex Afanasyev over 4 years ago

Agreed

#8 Updated by Junxiao Shi over 4 years ago

  • Status changed from Resolved to Closed

20150619 conference call approves the design.

#9 Updated by Junxiao Shi over 4 years ago

#10 Updated by Junxiao Shi over 4 years ago

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

#11 Updated by Junxiao Shi over 4 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.

#13 Updated by Eric Newberry about 4 years ago

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

#14 Updated by Junxiao Shi about 4 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
  );
}

Also available in: Atom PDF