]>
Alternative Delta Time Encoding for CCNx Using Compact Floating-Point Arithmetic
HAW HamburgBerliner Tor 7HamburgD-20099Germany+4940428758067cenk.guendogan@haw-hamburg.dehttp://inet.haw-hamburg.de/members/cenk-gundoganHAW HamburgBerliner Tor 7HamburgD-20099Germanyt.schmidt@haw-hamburg.dehttp://inet.haw-hamburg.de/members/schmidtNetwork Systems Research and Design4 Shady Hill SquareCambridgeMA02138USAdaveoran@orandom.netlink-lab & FU
BerlinHoenower Str. 35BerlinD-10318Germanymw@link-lab.nethttp://www.inf.fu-berlin.de/~waehl
IRTF
ICNRGtemplateCCNx utilizes delta time for a number of functions. When using CCNx in environments with constrained nodes or bandwidth constrained networks, it is valuable to have a compressed representation of delta time. In order to do so, either accuracy or dynamic range has to be sacrificed. Since the current uses of delta time do not require both simultaneously, one can consider a logarithmic encoding such as that specified in and . This document updates CCNx messages in TLV Format to specify this alternative encoding.CCNx utilizes time values for a number of functions. Some of these are expressed as absolute time, others as delta time. CCNx is well suited for Internet of Things (IoT) applications . When using CCNx in environments with constrained nodes or bandwidth constrained networks, it is valuable to have a compact representation of time values. For example and specify a compression scheme useful over IEEE 802.15.4 networks. However, any compact time representation has to sacrifice accuracy or dynamic range. For some time uses this is relatively straightforward to achieve, for other uses, it is not. This document discusses the various cases, and proposes a compact encoding that is easily accommodated for delta times.The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119.This document uses the terminology of and for CCNx entities.The following terms are used in the document and defined as follows:
synonym for octeta time offset measured in secondsan 8-bit encoded time valueCCNx, as currently specified in , utilizes delta time for only the lifetime of an Interest message (see sections 2.1, 2.2, 2.4.2, 10.3 of ). It is a hop-by-hop header value, and is currently encoded via the T_INTLIFE TLV as a 64-bit integer ( section 3.4.1). While formally an optional TLV, in all but some corner cases every Interest message is expected to carry the Interest Lifetime TLV, and hence having compact encoding is particularly valuable for keeping Interest messages short.Since the current uses of delta time do not require both accuracy and dynamic range simultaneously, one can consider a logarithmic encoding such as that specified in and outlined in . This document updates CCNx messages in TLV Format to permit this alternative encoding for selected time values. See for the specific actions needed to register this alternative compact representation of Interest Lifetime.CCNx, as currently specified in , utilizes absolute time for various important functions. Each of these absolute time usages poses a different challenge for a compact representation. These are discussed in the following subsections.Signature Time is the time the signature of a content object was generated (sections 8.2-8.4).
Expiry Time indicates the expiry time of a content object (section 4).
Both values are content message TLVs and represent absolute timestamps in milliseconds since the UTC epoch (i.e., an NTP timestamp).
They are currently encoded via the T_SIGTIME and T_EXPIRY TLVs as 64-bit unsigned integers (see section 3.6.4.1.4.5 and 3.6.2.2.2).Both time values could be in the past, or in the future, potentially by a large delta.
They are also included in the security envelope of the message.
Therefore, it seems there is no practical way to define an alternative compact encoding that preserves its semantics and security properties; hence we don't consider it further as a candidate.Recommended Cache Time (RCT) for a content object (see section 4) is a hop-by-hop header stating the expiration time for a cached content object in milliseconds since the UTC epoch (i.e., an NTP timestamp). It is currently encoded via the T_CACHETIME TLV as a 64-bit unsigned integer (see section 3.4.2).A recommended cache time could be far in the future, but cannot be in the past and is likely to be a reasonably short offset from the current time.
Therefore, this document allows the recommended cache time to be interpreted as a relative time value rather than an absolute time, since the semantics associated with an absolute time value do not seem to be critical to the utility of this value.
This document therefore updates the recommended cache time with the following rule set:
Use absolute time as per Use relative time, if the compact time representation is used (see and )
This document uses the compact time representation of ICNLoWPAN (see section 7 of ) that is inspired by and .
Its logarithmic encoding supports a representation ranging from milliseconds to years.
depicts the logarithmic nature of this time representation.
Time codes encode exponent and mantissa values in a single byte, but in contrast to the representation in , time codes only encode positive numbers and hence do not include an extra sign bit.
shows the configuration of a time code: an exponent width of 5 bits, and a mantissa width of 3 bits.
The base unit for time values are seconds. A time value is calculated using the following formula (adopted from and ),
where (a) represents the mantissa, (b) the exponent, and (C) a constant factor set to C := 1/32.
(0 + a/8) * 2 * C
(1 + a/8) * 2^b * C
The subnormal form provides a gradual underflow between zero and the smallest normalized number.
Eight time values exist in the subnormal range [0s,~0.054688s] with a step size of ~0.007812s between each time value.
This configuration also encodes the following convenient numbers in seconds: [1, 2, 4, 8, 16, 32, 64, ...].
further includes test vectors to illustrate the logarithmic range.
An example algorithm to encode a time value into the corresponding exponent and mantissa is given as pseudo code in .
Not all time values can be represented by a time code.
For these instances, the closest time code is chosen that is smaller than the value to encode.
As an example: No specific time code for 0.063 exists, but this algorithm maps to the closest valid time code that is smaller, i.e., exponent 1 and mantissa 0 (the same as for time value 0.0625).
A straightforward way to accommodate the compact time approach is to use a 1-byte length field to indicate this alternative encoding while retaining the existing TLV registry entries.
This approach has backward compatibility problems, but may still be considered for the following reasons:
Both CCNx RFCs are experimental and not Standards Track, hence expectations for forward and backward compatibility are not as stringent. "Flag day" upgrades of deployed CCNx networks, while inconvenient, are still feasible.The major use case for these compressed encodings are smaller-scale IoT and/or sensor networks where the population of consumers, producers, and forwarders is reasonably small.Since the current TLVs have hop-by-hop semantics, they are not covered by any signed hash and hence may be freely re-encoded by any forwarder. That means a forwarder supporting the new encoding can translate freely between the two encodings.The alternative of assigning new TLV registry values does not substantially mitigate the interoperability problems anyway.The following lists alternative approaches of integrating the compact time representation for time offsets in CCNx messages.
A further analysis, discussion, and decision on the best suited approach will be added as the document progresses.
Relative time TLVs (e.g., T_INTLIFETIME) include nested TLVs to hint at the used encoding.
This approach allows for versatility in defining new time encodings, but adds a TLV overhead that negates the benefits of the compact time representation.A new TLV type for the compact time representation is defined (T_INTLIFETIME_COMPACT).
The packet header grammar from is updated to allow for T_INTLIFETIME_COMPACT at the same level of the currently defined T_INTLIFETIME.The Interest Lifetime definition in allows for a variable-length lifetime representation, where a length of 1 encodes the linear range [0,255] in milliseconds.
This document changes the definition to always encode 1-byte Interest lifetime values in the compact time value representation ().
A note on legacy forwarders: A forwarder that does not support
this compact time representation will interpret the time value as an Interest
lifetime between 0 and 255 milliseconds. This may lead to a degradation of network performance, since Pending Interest Table (PIT) entries timeout quicker than expected.The Recommended Cache Time definition in specifies an absolute time representation that is of a length fixed to 8 bytes.
This document changes the definition to always encode 1-byte Recommended Cache Time values in the compact relative time value representation ().
The packet processing is adapted to calculate an absolute time from the relative time code based on the absolute reception time.
On transmission, a new relative time code is calculated based on the current system time.A note on legacy forwarders: A forwarder that does not support
this compact time representation is expected to consider a Recommended Cache Time with length 1 as a structural or syntactical error and discard the packet.
Otherwise, a forwarder interprets the compact 1-byte time value as an absolute time far in the past, which impacts cache utilization.
Based on the approach of integration, certain TLV registries from need to be updated.
Please change the registry for the T_INTLIFE to permit a length of 1 in addition to a length of 8, as follows:.
?>
This document makes no semantic changes to , nor to any of the security properties of the message encodings of , and hence has the same security considerations as those two existing documents.
&RFC2119;
&RFC5497;
&RFC7927;
&RFC8569;
&RFC8609;
&RFC9139;
Standard for Floating-Point ArithmeticDesigning a LoWPAN convergence layer for the Information Centric Internet of ThingsHAW HamburgHAW HamburgHAW HamburgFU BerlinComputer Communications, Vol. 164, No. 1, p. 114–123, Elsevier
The test vectors in show sample time codes and their corresponding time values according to the algorithm outlined in .
Time CodeTime Value (seconds)0x000.0000000x010.0078120x040.0312500x080.0625000x150.2031250x281.0000000x302.0000000xF867108864.0000000xFF125829120.000000
A forwarder frequently converts compact time into milliseconds to compare Interest lifetimes and the duration of cache entries.
On many architectures, multiplication and division perform slower than addition, subtraction, and bit shifts.
The following equations approximate the formulas in , and scale from seconds into the milliseconds range by applying a factor of 2^10 instead of 10^3.
This results in an error of 2.4%.
2^10 * a * 2^-3 * 2^1 * 2^-5 = a << 3
(2^10 + a * 2^-3 * 2^10) * 2^b * 2^-5 = (1 << 5 + a << 2) << b
We would like to thank the active members of the ICNRG research group for constructive thoughts.
In particular, we thank Marc Mosko and Ken Calvert for their valuable feedback on the encoding scheme and the protocol integration.