You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Arpit Malhotra <ar...@gmail.com> on 2013/08/09 19:36:08 UTC

CouchDB UUID suggestion

Hi All,
I have a suggestion regarding couchdb id generation. Please correct me if I
am wrong -
since couchdb ids are treated as strings (not as 128 bit nums) so why don't
you convert the base-16 UUID to base-36 alphanumeric string to save some
characters and make IDs shorter. I converted UUID to base-36 in my API and
get 13 byte string instead of a 32byte UUID string

Thanks,
Arpit

Re: CouchDB UUID suggestion

Posted by Alexander Shorin <kx...@gmail.com>.
I believe because UUIDs in base-16 form are more canonical than in any
other base (sure, except of 128-bit number). You may easily convert it
into binary form or whatever with standard tools. Also, I wonder how
you get 13 bytes from 32 byted string with base-36 since there should
be 25 bytes after conversion.
--
,,,^..^,,,


On Fri, Aug 9, 2013 at 9:36 PM, Arpit Malhotra <ar...@gmail.com> wrote:
> Hi All,
> I have a suggestion regarding couchdb id generation. Please correct me if I
> am wrong -
> since couchdb ids are treated as strings (not as 128 bit nums) so why don't
> you convert the base-16 UUID to base-36 alphanumeric string to save some
> characters and make IDs shorter. I converted UUID to base-36 in my API and
> get 13 byte string instead of a 32byte UUID string
>
> Thanks,
> Arpit