faces/create: require canonical FaceUri
Allow only canonical FaceUri in
faces/create command: require specifying either IPv4 or IPv6, permit IP address only (no DNS resolution).
NFD Developer Guide should be updated as part of this Task to reflect this change.
Updated by Junxiao Shi almost 7 years ago
This task requires the controller to verify if the FaceUri is canonical. So this job should be done in the ndn-cxx.
NO. This Task is to modify
FaceManager so that non-canonical FaceUri is rejected with code 400.
Also please let me know how to update NFD Developer Guide?
Updated by Junxiao Shi over 6 years ago
Since someone is asking, I'll explain the rationale of requiring canonical FaceUri in
faces/create: canonization is not the responsibility of NFD.
- NFD's responsibility is to forward NDN packets in NDN network.
- A major part of FaceUri canonization is performing a DNS lookup.
- DNS resolution is performed in IP network, and it can sometimes get messy and complex.
- DNS resolution routines in standard libraries are blocking; calling a blocking function in single-threaded NFD is bad. Third party libraries can offer non-blocking DNS resolution, but they increase the complexity of NFD.
In addition, face query operation (see FaceMgmt) requires canonical FaceUris.
- It's difficult or even impossible to compare two non-canonical FaceUris.
- Performing FaceUri canonization incurs all problems above.
- The same non-canonical FaceUri may resolve to different canonical FaceUris overtime, eg. due to DNS round-robin.
Requiring canonical FaceUri makes NFD simpler, and moves the complexity of DNS resolution to the client.