CDMI - object ID

44 views
Skip to first unread message

byte_2702

unread,
Mar 10, 2014, 12:45:43 PM3/10/14
to snia-...@googlegroups.com
Dear Ladies and Gentlemen,

I continue to work at our CDMI implementation at the moment and I have seen something where I feel a bit unsure.

The CDMI v1.0.2 specification of ISO/IEC tells:
"The native format of an object ID is a variable-length byte sequence and shall be a maximum length of 40 bytes."
I understood all rules how to build that variable-length byte sequence already and I built such a sequence already.

The CDMI v1.0.2 specification also tells:
"The native format for an object ID is binary. When necessary, such as when included in URIs and JSON strings, the object ID textual representation shall be encoded using base 16 encoding rules described in RFC 4648 and shall be case insensitive."

An example for the textual representation of the object ID is shown in the CDMI v1.0.2 specification as:
"00006FFD0010AA33D8CEF9711E0835CA" << The textual representation of the object ID has a length of 32 here, some other examples in the specification show that the textual representation of such an object ID is not longer than 40 hex characters (or bytes).

If I convert the native format of an object ID (binary) with the maximum length of 40 bytes to the textual representation (hex), I receive a string with a length of 80 characters (or bytes).
I know the reason for it, because a "1 byte = 8 bits = (binary) 11111111 = (decimal) 255" is equal "hex = 0xff". that means that every single binary byte needs two bytes for the textual representation as hex string then, which should explain why the textual representation has the double length of the binary representation. I don't see an error here at the moment, I only wondered that it is so long then.

I just wanted to go sure and wanted to ask if it is correct if it is known that the object ID textual representation might be up to 80 bytes or 80 characters long, or if I have mistunderstood something here.

Many thanks in advance,
Jana

David Slik

unread,
Mar 10, 2014, 1:09:10 PM3/10/14
to snia-...@googlegroups.com, byte_2702
It is correct that the CDMI Object IDs may be up to 80 characters long when in a hex representation.

If you are, for example, creating a database table to store CDMI Object IDs, you would want to ensure that sufficient space is allocated to be able to store up to 80 characters per value.

While the CDMI specification mandates that all object IDs shall be transferred over the wire in hex notation, a CDMI client and/or server is free to use alternative representations (such as raw binary) to store object IDs.

Thanks,

David Slik

Technical Director, Object Storage, NetApp, Inc.
Co-chair, SNIA Cloud Storage Technical Working Group


--
You received this message because you are subscribed to the Google Groups "SNIA Cloud" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snia-cloud+...@googlegroups.com.
To post to this group, send email to snia-...@googlegroups.com.
Visit this group at http://groups.google.com/group/snia-cloud.
For more options, visit https://groups.google.com/d/optout.

byte_2702

unread,
Mar 10, 2014, 1:23:39 PM3/10/14
to snia-...@googlegroups.com, byte_2702
Many thanks for the fast answer!

I wish you a great day!!!

Thanks, Jana :-)
Reply all
Reply to author
Forward
0 new messages