Task #1993
closedFace query operation
Added by Junxiao Shi about 10 years ago. Updated about 10 years ago.
100%
Description
Implement Query Operation in FaceManager.
This Task includes:
- evaluate query conditions on a face
- Conditions can be evaluated on
nfd::Face
directly, using its properties - Alternatively,
FaceStatus
can be requested from every face, and conditions can be evaluated onFaceStatus
block - The design choice shall be justified
- Conditions can be evaluated on
- in
FaceManager
, accept query Interest and publish result dataset
Updated by Junxiao Shi about 10 years ago
- Blocked by Task #1992: Replace FaceFlags with individual fields added
Updated by Junxiao Shi about 10 years ago
- Description updated (diff)
- Estimated time changed from 5.00 h to 8.00 h
Updated by Junxiao Shi about 10 years ago
- Blocks Task #1995: nfdc: accept FaceUri in all commands added
Updated by Chengyu Fan about 10 years ago
Here is the design for this task. Please point it out if I understand sth incorrectly.
in ndn-cxx, add FaceQueryFilter type, use FaceTraits as the base class.
To evaluate the query conditions, there should be a class QueriedFaceStatusPublisher, which inherits the class FaceStatusPublisher, and overrides the generate() functions. The QueriedFaceStatusPublisher should generate FaceQueryFilter data by comparing with the filter contained in the Interest.
in FaceManager, accept the query Interests and process it using a new unsignedVerbProcessor.
Updated by Junxiao Shi about 10 years ago
@Steve, please review/approve the design in note-5.
Updated by Anonymous about 10 years ago
Chengyu Fan wrote:
Here is the design for this task. Please point it out if I understand sth incorrectly.
- in ndn-cxx, add FaceQueryFilter type, use FaceTraits as the base class.
I'm not familiar with these classes, so I'm going to assume this is correct. Traditionally, tasks that involve adding to or modifying ndn-cxx have a corresponding task in the ndn-cxx project.
- To evaluate the query conditions, there should be a class QueriedFaceStatusPublisher, which inherits the class FaceStatusPublisher, and overrides the generate() functions. The QueriedFaceStatusPublisher should generate FaceQueryFilter data by comparing with the filter contained in the Interest.
This is mostly right, but I don't think there's a compelling reason to inherit from FaceStatusPublisher
(correct me if I'm wrong). I think you should inherit from its parent, SegmentPublisher
(under core) instead.
Also, I would just call the new class FaceQueryPublisher
.
- in FaceManager, accept the query Interests and process it using a new unsignedVerbProcessor.
Yes.
Updated by Chengyu Fan about 10 years ago
Steve DiBenedetto wrote:
Chengyu Fan wrote:
Here is the design for this task. Please point it out if I understand sth incorrectly.
- in ndn-cxx, add FaceQueryFilter type, use FaceTraits as the base class.
I'm not familiar with these classes, so I'm going to assume this is correct. Traditionally, tasks that involve adding to or modifying ndn-cxx have a corresponding task in the ndn-cxx project.
I'll create another ndn-cxx task for adding FaceQueryFilter type.
- To evaluate the query conditions, there should be a class QueriedFaceStatusPublisher, which inherits the class FaceStatusPublisher, and overrides the generate() functions. The QueriedFaceStatusPublisher should generate FaceQueryFilter data by comparing with the filter contained in the Interest.
This is mostly right, but I don't think there's a compelling reason to inherit from
FaceStatusPublisher
(correct me if I'm wrong). I think you should inherit from its parent,SegmentPublisher
(under core) instead.Also, I would just call the new class
FaceQueryPublisher
.
I think you are right, I will use this design.
- in FaceManager, accept the query Interests and process it using a new unsignedVerbProcessor.
Yes.
Updated by Junxiao Shi about 10 years ago
- Blocked by Task #2085: add FaceQueryFilter type added
Updated by Junxiao Shi about 10 years ago
- Description updated (diff)
- Estimated time changed from 8.00 h to 7.00 h
I meant to include ndn-cxx's FaceQueryFilter
type as part of this Task, but #2085 is created, so I'm deleting that item from this Task.
Updated by Chengyu Fan about 10 years ago
- Status changed from New to In Progress
Updated by Chengyu Fan about 10 years ago
For the current design of Face Dataset, there is no field called UriScheme, but it is required in the FaceQueryFilter type.
So how to handle the filter that contains this field?
Updated by Alex Afanasyev about 10 years ago
I would just directly use UriScheme
parameter in the query to request FaceDataset only from faces that match the scheme. It is kind of wasteful to request everything and then do filtering.
Updated by Chengyu Fan about 10 years ago
I agree.
But the Face class does not contain such attribute UriScheme, what I'm confused is how to handle a filter with the UriScheme parameter? Do I need to modify the Face class to support UriScheme?
Updated by Junxiao Shi about 10 years ago
This Task MUST NOT modify Face dataset.
The UriScheme condition is evaluated on RemoteUri and LocalUri attributes of FaceStatus element:
UriScheme permits a face if the scheme part of its local FaceUri or remote FaceUri equals the value
bool matchesUriScheme = filter.uriScheme == faceStatus.localUri.scheme ||
filter.uriScheme == faceStatus.remoteUri.scheme;
Updated by Chengyu Fan about 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 70 to 100
Updated by Junxiao Shi about 10 years ago
- Blocked by Task #1722: FaceMgmt: query operation added
Updated by Junxiao Shi about 10 years ago
Producer generated NACK is available in ndn-cxx as of commit cad32e3a84c28a035e721828f24a07b88692f690.
If the assignee wants, an invalid query filter could be responded to with a producer generated NACK.
I won't define this in the protocol, because management protocol is not supposed to use a non-standardized feature.
The behavior of invalid query filter would be left undefined in the protocol.
Updated by Junxiao Shi about 10 years ago
- Status changed from Code review to In Progress
- % Done changed from 100 to 90
First commit is merged. Another commit is needed to add producer-generated NACK in response to an invalid FaceQueryFilter.
Updated by Junxiao Shi about 10 years ago
- Blocked by Task #2128: Deduplicate tlv::ContentTypeValue and MetaInfo::TYPE_* added
Updated by Junxiao Shi about 10 years ago
tests/daemon/mgmt/face-query-status-publisher-common.hpp
in commit 320d23334f01cf481bb2ce9d1f66afbbf967aa51 is causing build errors. Please fix immediately.
Updated by Alex Afanasyev about 10 years ago
Updated by Chengyu Fan about 10 years ago
Thanks, @Alex.
I just received the message. You're right that the message is from the misuse of the content type.
I will continue this task using the new content type.
Updated by Chengyu Fan about 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 90 to 100
Updated by Junxiao Shi about 10 years ago
- Status changed from Code review to Closed