Jump to content

Universally unique identifier

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 84.245.10.15 (talk) at 15:27, 12 July 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A Universally Unique Identifier is an identifier standard used in software construction, standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE). The intent of UUIDs is to enable distributed systems to uniquely identify information without significant central coordination. Thus, anyone can create a UUID and use it to identify something with reasonable confidence that the identifier will never be unintentionally used by anyone for anything else. Information labelled with UUIDs can therefore be later combined into a single database without need to resolve name conflicts. The most widespread use of this standard is in Microsoft's Globally Unique Identifiers (GUIDs) which implement this standard.

A UUID is essentially a 16-byte number and in its canonical form a UUID may look like this:

550e8400-e29b-11d4-a716-446655440000

UUIDs are documented as part of ISO/IEC 11578:1996 "Information technology -- Open Systems Interconnection -- Remote Procedure Call (RPC)" and more recently in ISO/IEC 9834-8:2005. The IETF has published Proposed Standard RFC http://www.ietf.org/rfc/rfc4122.txt.

Conceptually, the original (version 1) generation scheme for UUIDs was to concatenate the UUID version with the MAC address of the computer that is generating the UUID, and with the number of 100-nanosecond intervals since the adoption of the Gregorian calendar. In practice, the actual algorithm is more complicated. This scheme has been criticized in that it is not sufficiently 'opaque'; it reveals both the identity of the computer that generated the UUID and the time at which it did so.

Several other generation algorithms have been developed and incorporated into the standard, including a scheme relying only on random numbers (version 4 UUIDs), and a scheme deriving a UUID from a URL via MD5 (version 3 UUIDs) or SHA-1 (version 5 UUIDs) hashing.

The J2SE 5.0 release of Java provides a class that will produce 128-bit UUIDs. The API documentation for the java.util.UUID class refers to ISO/IEC 11578:1996.

In PHP there are several modules for creating uuid's in debian the module is installed via apt-get:

  • php4-uuid - OSSP uuid module for php4
  • php5-uuid - OSSP uuid module for php5

The Pecl package

See also