Feature #4247
closedAutomatic per-data-packet (per-group) prefix registrations
80%
Description
After the switch to v2::Certificate, we need to "restore" ability to serve certificates from the repo on a passing by node that potentially has those data packets. In order to do so, repo needs to automatically register with local NFD all (some) prefixes of data.
This is a similar function to what we previously (a long time ago) discussed for PIB service.
Updated by Muktadir Chowdhury about 7 years ago
I need some help regarding the task. The description is not very clear to me. I will try to break it down according to my understanding:
First, Repo will serve certificate to the other nodes. For that repo will store the certificates some where (CertificateCache?) and set interest filter on the certificate's common prefix.
Second, Repo needs to register prefix for the data prefixes here : https://github.com/named-data/repo-ng/blob/master/src/repo.cpp#L148.
I am not aware of the discussion related to PIB service. So can't relate.
Updated by Alex Afanasyev about 7 years ago
I think you're over-thought the issue. Right now repo registers with local NFD a set of prefixes specified in the configuration file. With this issue (which should be an option to enable), the repo should register prefixes that correspond to all data packets stored in repo (could be many prefixes, but it's ok). So, you don't need to use any new data structures, rather differently handle the startup and add additional logic on when data packet is added to the storage and removed from the storage.
Updated by Junxiao Shi about 7 years ago
Registering the exact name of each stored Data packet would not supoort the certificate use case, because the Interest to retrieve a certificate is usually a true prefix of the Data name.
Without loss of generality, I would envision:
- a configuration option that determines the granularity of prefix registration, ie "register Data name minus last k components"
- alternatively, a parameter in repo insertion command that determines the granularity, along with a database field storing this parameter
The program logic needs to ensure the prefix registration is not withdrawn until the last Data requiring such registration is deleted.
Updated by Junxiao Shi about 7 years ago
add additional logic on when data packet is added to the storage and removed from the storage.
Hint: given ReadHandle
is reponsible for data prefix registration, RepoStorage
needs to emit signals upon Data insertion and deletion, and ReadHandle
shall react to such signals.
Caution:
Updated by Muktadir Chowdhury about 7 years ago
- Assignee changed from Muktadir Chowdhury to Nicholas Gordon
Updated by Nicholas Gordon about 7 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 80
I've implemented the feature, and am finishing up on the tests. Provided everything goes smoothly, this should be finished promptly.
Updated by Nicholas Gordon about 7 years ago
- Status changed from In Progress to Code review
Updated by Nicholas Gordon about 7 years ago
- Status changed from Code review to Closed