-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for SVS v2 #14
base: main
Are you sure you want to change the base?
Conversation
@justincpresley proposed a more space-efficient encoding that omits the TLV-TYPE and TLV-LENGTH of StateVectorEntry. |
Specification.md
Outdated
|
||
A state vector is appended to the name in TLV format: | ||
The State Vector is encoded in TLV format and included in the Application Parameters of the Sync Interest. The State Vector SHOULD be the first TLV block in the Application Parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under TLV evolvability guidelines, it's not good to enforce a particular TLV being the first one, without a strong technical reason.
It's better to accept any ordering, with a recommendation that StateVector appearing before MappingData.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with a recommendation that StateVector appearing before MappingData
why the recommendation? unless a specific order is mandatory, a receiver cannot make any assumptions anyway, so why bother with a recommended order in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recommended ordering improves Interest aggregation. It is not enforced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure interest aggregation is a concern here? it's a signed interest anyway...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signing with HMAC key and skipping all random fields in SigInfo => aggregation possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not debating whether it's possible or not, but whether it's a concern. I'm saying "why bother". Moreover, this may even be application dependent, and the order itself (even if just a recommendation) doesn't matter as long as it's consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear: I'm not against suggesting a specific order in SVS, I just don't think it's very useful or makes a meaningful difference in practice. A consistent order across all ApplicationParameters is more important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't care honestly. But it's easier / better to recommend a order than recommending consistency for interoperability between vendors.
I discuss this at length here. In short, I propose an addition to the specification of NDN: making the concept of a TLV List explicit and heterogeneous. My encoding improvements to SVS simply follow this proposal. Changing only SVS could mislead other protocols. |
When you say "specification of NDN", are you referring to the network-layer packet format? Can you make an example where this new encoding could be used? |
Yes to the packet format. I assume TLV Lists are not heavily used in creating the concept of a NDN packet and thus left unstated. I suppose just documentation? added to the end of the TLV section or a page like it. Anywhere where a list is involved. A Name is naturally a heterogeneous list already. Possibly only useful in custom TLVs. Statevectors, mapping info, in ndn-cert when agreeing upon algorithms, etc. |
My thoughts for v2:
I am a fan of many smaller revisions/releases like NFD has had. This especially helps in this case as many libraries implement this protocol, and it gives them time to adopt changes. I think the partial StateVector work could be included in v3 if it does not make it in v2. |
88acde2
to
d173e06
Compare
The suppression curve is now part of the spec. I prefer not compromising soundness of structure for space efficiency. In fact the first version of SVS used a more efficient encoding but it's more complicated to parse and evolve. |
How about we fix the state diagram as well? |
When entering suppression state, is it still relevant to check against time remaining? I would think no right? due to the suppression curve change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to update the date in PubSubSpec.md.
|
||
To optimize the delivery of mapping data, SVS-PS implementations MAY piggyback mapping data in the Sync Interest's `ApplicationParameters`. If present, the mapping data SHOULD be appended as a single block after the StateVector in the `ApplicationParameters`. The mapping data MUST be encoded as a TLV block of type `MappingData` as defined above. | ||
|
||
When this optimization is implemented, Mapping Data SHOULD be inserted in every outgoing Sync Interest sent as a result of new data production. On receiving a Sync Interest, this mapping data can be utilized only after the Interest signature has been validated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally, MappingData is generated in response to a query Interest, which includes low-seq and high-seq fields.
With delivery optimization, how could the publisher predict what low-seq and high-seq is wanted by the subscriber?
No description provided.