← Back to team overview

dhis2-devs team mailing list archive

Re: uuid

 

On 23 October 2011 23:49, Saptarshi Purkayastha <sunbiz@xxxxxxxxx> wrote:
> UUID is optimized in a lot of database systems, if those are put in IDENTITY
> columns
> Any other generated unique ids are going to be treated as plain varchar

Hi Saptarshi

That's interesting - haven't seen examples of this but it makes sense
that uuid might be stored using some sort of binary format.  But in
most cases its probably 36 chars.  I though IDENTITY was about
auto-incrementing fields?

>
> REST services should probably make use of UUID because its easy and
> most-likely safe to be unique across implementations

I think the discussion has been that the degree of uniqueness
"guarantee" is greater than what we need.  After all we are not
requiring identifiers that are so globally unique as to distinguish a
malaria indicator in Kenya from a hard drive in Korea.  We require a
reasonable likliehood that a set of orgunits or dataelements in a
particular context will be uniquely identified.  For that (pseudo)
random selection from 5e19 seems adequate.  UUIDs make for long urls.

But my initial question, apart from debating the merits of various
approaches, is whether anyone is currently using the uuid field in
dhis?  besides Jo.

Regards
Bob

> ---
> Regards,
> Saptarshi PURKAYASTHA
>
> My Tech Blog:  http://sunnytalkstech.blogspot.com
> You Live by CHOICE, Not by CHANCE
>
>
> On 24 October 2011 02:03, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
>>
>> Lars and Jo and I have been discussing a bit about ids off list.
>>
>> One conclusion we have reached is that we should auto-generate a
>> unique identifier which is not quite as cumbersome as a uuid.
>>
>> You might have noticed the CodeGenerator class which has recently
>> appeared in the api.  This generates an 11 character code matching
>> regex [0-9a-zA-Z]{11}.  That is 62^11 unique permutations (or 5.2e19)
>> which is a reasonably big number.
>>
>> It seems unnecessary to maintain both this and the uuid.  Which begs
>> the question, is anybody actually using the uuid currently?
>>
>> Cheers
>> Bob
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>
>


References