Project

General

Profile

Actions

Feature #4438

closed

Add a signal to SegmentFetcher to notify the reception of a Data segment

Added by Muktadir Chowdhury over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Utils
Target version:
Start date:
01/08/2018
Due date:
% Done:

100%

Estimated time:

Description

Currently, there is no way to get the actual segmented data packet from segment fetcher.

The task involves doing the following:
(1) Add a ndn::util::Signal in the ndn::util::SegmentFetcher
(2) The SegmentFetcher::fetch() method will return the SegmentFetcher instance it creates.

Application can use the returned segment fetcher instance to connect to the signal.


Related issues 1 (0 open1 closed)

Blocks NLSR - Feature #4448: Serve other routers' certificatesClosedMuktadir Chowdhury01/09/2018

Actions
Actions #1

Updated by Davide Pesavento over 6 years ago

  • Tracker changed from Task to Feature
  • Subject changed from Add a signal in the segment fetcher to detect the receiving of a data segment. to Add a signal to SegmentFetcher to notify the reception of a Data segment
  • Category set to Utils
  • Target version set to v0.7
Actions #2

Updated by Muktadir Chowdhury over 6 years ago

  • Related to Feature #4448: Serve other routers' certificates added
Actions #3

Updated by Muktadir Chowdhury over 6 years ago

  • Related to deleted (Feature #4448: Serve other routers' certificates)
Actions #4

Updated by Muktadir Chowdhury over 6 years ago

Actions #5

Updated by Junxiao Shi over 6 years ago

For NLSR’s use case, I’d suggest an additional signal:

Signal<SegmentFetcher, Data> afterSegmentValidated;

This is emitted only if the Data passes validation.

Actions #6

Updated by Davide Pesavento over 6 years ago

I'm not against using signals in general, but the current SegmentFetcher API is based on callbacks. This proposal mixes callbacks and signals, and makes the API ugly and inconsistent. Any reasons we're not augmenting the API by adding more callbacks? Or alternatively, why not make the whole API signal-based? (in the latter case, existing callbacks can be deprecated and eventually removed).

Actions #7

Updated by Davide Pesavento over 6 years ago

  • Status changed from In Progress to Code review
Actions #8

Updated by Junxiao Shi over 6 years ago

Any reasons we're not augmenting the API by adding more callbacks?

There are already too many of them.

why not make the whole API signal-based?

I agree with this. In this case, fetch function shall be renamed as start and the function does not take any callbacks.
The fetch function becomes deprecated.

Actions #9

Updated by Muktadir Chowdhury over 6 years ago

Junxiao Shi wrote:

Any reasons we're not augmenting the API by adding more callbacks?

There are already too many of them.

why not make the whole API signal-based?

I agree with this. In this case, fetch function shall be renamed as start and the function does not take any callbacks.
The fetch function becomes deprecated.

I think it should be in a different commit. What do you think? I can crate an issue for this.

Actions #10

Updated by Alex Afanasyev over 6 years ago

Guys, I don't disagree with moving to signal based, but I would consider it is "beautification" that we can do later in due time. We have kind of an emergency to make this specific signal work, so let's not stall.

Actions #11

Updated by Muktadir Chowdhury over 6 years ago

Created an issue #4464 to make SegmentFetcher Signal based.

Actions #12

Updated by Davide Pesavento over 6 years ago

  • Status changed from Code review to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF