随笔 - 224  文章 - 41  trackbacks - 0
<2011年5月>
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

享受编程

常用链接

留言簿(11)

随笔分类(159)

随笔档案(224)

文章分类(2)

文章档案(4)

经典c++博客

搜索

  •  

最新评论

阅读排行榜

评论排行榜

原文地址:http://blog.csdn.net/nidehong/archive/2006/11/22/1406125.aspx


UUID

通用惟一标识符(UUID)是128位比特的数字,用来惟一地标识因特网上的某些对象或者实体。

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.

一个UUID 是一个标识符标准用于软件架构,是由开放软件基金会(OSF)作为分布式计算环境(DCE)的一部分而制定的标准。UUIDs的目的就是使分布式系统可以不需要重要的中央调合系统而能唯一地标识信息。这样,任何人能创造一个UUID 和使用它来标识一些东西,而且,你有足够的信心来确定这个标识是永远不会被任何人无意地使用在任何东西上。因此,信息加上了UUID标签就能合并到单个数据库中而不用去解决命名冲突的问题。这个标准的广泛应用在微软的全球唯一标识符(GUIDs)上,GUID实现了这个标准。

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

:550E8400-E29B-11D4-A716-446655440000

And has this structure in the C programming language:

typedef struct {
unsigned32 time_low;
unsigned16 time_mid;
unsigned16 time_hi_and_version;
unsigned8 clock_seq_hi_and_reserved;
unsigned8 clock_seq_low;
byte node6;
} uuid_t;

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

关于UUID的定义,详细内容可参考http://www.ietf.org/rfc/rfc4122.txt,文档里面还有C语言对UUID标准的各种实现。

GUID

A Globally Unique Identifier or GUID is a pseudo-random number used in software applications. While each generated GUID is not guaranteed to be unique, the total number of unique keys (2128 or 3.4028×1038) is so large that the possibility of the same number being generated twice is very small.

一个全球唯一标识符 或 GUID 是一个假随机数用于软件中。虽然每个产生的GUID是不保证唯一的,但不同的标识符总数是(2128 也就是3.4028×1038)如此之大,以至于相同的数字被产生两次的机率是很相当小的。

The GUID is an implementation by Microsoft of a standard called Universally Unique Identifier (UUID), specified by the Open Software Foundation (OSF).

GUID 是微软对UUID这个标准的实现。UUID是由开放软件基金会(OSF)定义的。

UUID还有其它各种实现,不止GUID一种,其它的在此不详细说明。

posted on 2010-09-17 10:58 漂漂 阅读(828) 评论(0)  编辑 收藏 引用 所属分类: 计算机基本概念

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理