Markdown Version | Session Recording
Session Date/Time: 22 Jan 2025 15:00
CBOR
Summary
The CBOR working group held an interim meeting to discuss progress and open issues on two key documents: the CDE (Canonical CBOR Deterministic Encoding) document and P-CBOR (Packed CBOR). A significant portion of the CDE discussion centered on the concept of Application Layer Deterministic Representation (ALR), with differing views on its necessity within the document and its broader applicability. For P-CBOR, an alternative proposal, "SAR" (Compact Binary Array Records), was presented, leading to a discussion on complexity, tag allocation, and use cases. No definitive decisions were made on either topic during the meeting, with calls for continued discussion on the mailing list.
Key Discussion Points
CDE Document and Application Layer Deterministic Representation (ALR)
- Lawrence's Position: Argued that ALR is unnecessary and overcomplicates the CDE document. He stated that CDE has been robust for over a decade (since RFC 7049) without substantial threats, and the sole identified use case for ALR (DCBOR) layers correctly without issues. He emphasized that any additional text adds burden to implementers and increases document liability, asserting that new concepts like ALR should not be introduced without resounding community support, which he believes is currently lacking. While acknowledging the utility of the CDE draft for clarifications and CDDL, he felt there was no consensus for including ALR.
- Carsten's Position: Counter-argued that ALR is a critical and inseparable part of achieving full deterministic representation, distinct from mere deterministic encoding. He explained that ALR defines how application data should be structured in the generic CBOR data model to ensure consistent representation. Carsten noted that RFC 8949 section 4.2.2 already implicitly deals with ALR issues but benefits from explicit terminology. He cited RFC 9679 (COSE Key Thumbprint) as an example where ALR-like rules (e.g., using uncompressed EC forms) are already specified without being named. He contended that having a specific term for ALR prevents confusion, avoids attempts to modify CDE for application-layer concerns, and facilitates more efficient discussions, outweighing the "liability" of additional text.
- Broader Applicability of ALR: Dave raised the point that ALR appears to be a fundamental concept applicable across various data formats (e.g., ASN.1, JSON, XML), not just CBOR. He suggested that such an important concept, which should ideally be taught in schools, might be better suited for a standalone IETF RFC rather than being "buried" in an appendix of a CBOR document.
- Response to Broader Applicability: Carsten acknowledged ALR's broader relevance, noting that a general document on information model to data model serialization boundaries is overdue. However, he prioritized integrating the CBOR-specific aspects of ALR into the current CDE draft to provide immediate guidance to protocol designers, rather than waiting for a multi-year effort on a general RFC.
- Lack of Concrete Examples: Lawrence reiterated that the initial "immense threat" that ALR was presented to defend against was not adequately supported with concrete examples from within the IETF context, making the necessity of the concept within the document debatable. Carsten referenced issues in other SDOs (e.g., ETSI) but could not provide specific details due to confidentiality constraints.
P-CBOR Document and SAR Alternative
- Carsten's Introduction to P-CBOR: Carsten explained P-CBOR as a mechanism for "packing" at the data model level, not a general data compression scheme. It aims to save space while allowing direct access to packed representations without full expansion. P-CBOR utilizes existing CBOR tags to define "reference tags" (stable) and "table building tags" (application-specific). He highlighted benefits such as enabling generic ingesting implementations, sharing tags, and preventing application protocol designers from reinventing solutions.
- Technical Considerations for P-CBOR: Discussion points included the use of ranges of tags (a practice also seen in other drafts like COSE hash values and content format assignments), acknowledging that while some dislike it, it helps save bytes. The allocation of "good tags" (short, simple values) was identified as an engineering trade-off between immediate utility and preserving future tag space. An alternative design for reference tags, which might sacrifice 1.2 bytes per reference for other benefits, was also noted.
- Vadim's SAR Proposal: Vadim presented an alternative proposal, "SAR" (Compact Binary Array Records), stemming from work on a constrained layer 4/5 transport protocol. SAR uses "atoms" (integers replacing strings) similar to concepts in X11 or LISP. Vadim claimed SAR is simpler and more flexible than P-CBOR, arguing that P-CBOR is "complex" and "ad hoc" for many cases.
- SAR's Claimed Advantages: Vadim stated that SAR leverages existing tags (e.g., Tag 63 for CBOR sequence, Tag 24 for complete CBOR) for decoder state switching and supports multiple dictionaries (using short range tags). He emphasized SAR's focus on compression ratio and its ability to access data in place for complex scenarios, a feature he argued P-CBOR struggles with despite its claims. He also claimed SAR achieves similar compression with significantly fewer tag allocations, using "just one tag instead of millions."
- Discussion on Complexity and Examples: The Chair requested more realistic examples for P-CBOR and inquired about existing code implementations to compare the complexity of P-CBOR and SAR. Vadim stated he had no implementation yet but contrasted SAR's simple, left-to-right table expansion with P-CBOR's approach. Martin asked about SAR's potential for DNS compression, where his draft currently uses P-CBOR. Vadim suggested SAR could be more efficient for DNS by representing multiple labels as distinct atoms within a single string.
Decisions and Action Items
CDE Document
- Carsten:
- To completely remove the term "profile" from the CDE draft.
- To incorporate the COSE Key Thumbprint example into the ALR appendix for better illustration.
- To perform editorial rework based on the meeting discussions and feedback.
- To submit a -08 draft of the CDE document before the next interim meeting.
- Working Group Members:
- Are encouraged to review other parts of the CDE document in preparation for a future working group last call.
P-CBOR Document
- No specific actions or decisions were made regarding the P-CBOR document or the SAR alternative during this meeting.
Next Steps
- General: Discussions on both the CDE document (particularly ALR) and P-CBOR (including the SAR alternative) are to continue on the mailing list.
- CDE: Carsten will proceed with the specified action items for the CDE document, aiming for a -08 draft.
- P-CBOR: Further evaluation of P-CBOR and the SAR alternative is needed, including the development of more realistic examples and potential comparative implementations to assess complexity and efficiency.
- The next interim meeting is scheduled in two weeks.