According to the docs, UID uses timestamps and the built-in random number
generator. These two alone do not "officially" qualify the UID as *globally*
unique as it is possible, however unlikely, that two users could generate
UIDs at the same time and happen to generate similar random numbers
(particularly if you have millions of transactions running across many
different machines). Of course, the likelihood of that is vanishingly small,
but not as small as the likelihood of a collision with a traditional
GUID/UUID.

Traditional GUID/UUID generation leverages machine serial numbers to
virtually ensure uniqueness. The gold standard is MAC addresses (serial
numbers). An even better alternative or modern hardware that supports it are
CPU ID's. Either of those combined with 32-bit millisecond counts and 32-bit
"seconds since 1970" date/time clocks plus a random number produces an ID
that would basically only fail the universally unique test if someone was
*trying* to cause collisions (so its not encryption safe).

The algorithm I suggested for GUIDs earlier (based on the SHA1 of a string)
may or may not be better than Adobe's UID (I don't know their exact
algorithm). Their UID does match the standard format for UUID/GUID while
mine simply produces a unique key (quite a bit longer).

For your purposes, I would feel strongly that Adobe's UID is "good enough."

Troy.


On 06 Mar 2007 13:36:32 -0800, scott_flex <[EMAIL PROTECTED]> wrote:


My initial concerns was that it would give a true GUID.

This statement from the Flex Live docs on adobe.com states: "This UID
will not be truly globally unique; but it is the best we can do
without player support for UID generation."

Maybe i'm reading that wrong... but i'm not getting the sense that I
can guarantee these numbers to be unique across the board and be used
to uniquely identify rows in a database... either as the primary key
itself but most likely to determine the PK based on the rowGUID
column.

--Scott

--- In [email protected] <flexcoders%40yahoogroups.com>, "Gordon
Smith" <[EMAIL PROTECTED]> wrote:
>
> What are your concerns regarding createUID()?
>
> - Gordon
>
> ________________________________
>
> From: [email protected] <flexcoders%40yahoogroups.com>
[mailto:[email protected] <flexcoders%40yahoogroups.com>] On
> Behalf Of scott_flex
> Sent: Monday, March 05, 2007 4:57 PM
> To: [email protected] <flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Not able to generate GUID
>
>
>
>
> Is there no function or object to generate a GUID, a true globally
> unique identifier?
>
> the createUID is not what i'm looking for, just figured generating
a
> GUID would be something pretty basic.
>

Reply via email to