IPDR Compact Format
header versionMajor URI
descriptor (0) versionMinor name
event (type 0) ipdrRecorderInfo URI
event (type 0) startTime name
event (type 0) defaultNameSpace URI
descriptor (1) otherNameSpaces name
event (type 1) serviceDefinitionURI
event (type 0) docId
descriptor (2) descriptorId
event (type 1) attributeName
event (type 2) typeCode
event (type 2) attributeName
event (type 0) typeCode
... attributeName
docEnd descriptorId
valueA typeCode
valueB attributeName
count valueC typeCode
endTime valueD
Compact Format Goals
• Achieve compactness by eliminating
redundancy of information
• Leverage existing service definition work.
• Maintain separation of document format
from transport (i.e. can utilize simplest file
transfer mechanism)
• Use standards where available
Use of CORBA CDR
• Well defined encoding formats for primitive
types and structures.
• Provides standard definition language (IDL)
with well defined bindings in Java and
C/C++.
• Availability of opensource encoding tools.
Divergence from CDR (1 of 2)
• CDR expects sequences of items to be
encoded with the sequence length followed
by the elements.
• In order to avoid a second pass through data
the IPRDDoc encoding uses “indefinite
length” instead in two places:
– the sequence of descriptors and usage events
– the sequence of values in a single usage event
Divergence from CDR (2 of 2)
• The IDL defines the usage event as a simple
sequence of bytes. In fact the byte stream is
encoded according to the typing in the referenced
descriptor.
• As described earlier, this sequence uses an
indefinite length indicator. The indefinite length
indicator also acts like a checkpoint. If we don’t
encounter it when parsing an event, the document
is considered corrupt.