GDID StructureNFX Class Library

[This is preliminary documentation and is subject to change.]

Represents a Global Distributed ID key (key field) used in distributed databases that identify entities with a combination of unsigned 32 bit integer 'Era' and unsigned 64 bit integer 'ID'. The first 32 bit integer is an 'era' in which the 'ID' (64 bit) was created, consequently a GDID is a 12 byte = 96 bit integer that can hold 2^96 = 79,228,162,514,264,337,593,543,950,336 combinations. The ID consists of two segments: 4 bit authority + 60 bits counter. Authority segment occupies the most significant 4 bits of uint64, so the system may efficiently query the data store to identify the highest stored ID value in a range. Authorities identify one of 16 possible ID generation sources in the global distributed system, therefore ID duplications are not possible between authorities. Within a single era, GDID structure may identify 2^60 = 1,152,921,504,606,846,976(per authority) * 16(authorities) = 2^64 = 18,446,744,073,709,551,616 total combinations. Because of such a large number of combinations supported by GDID.ID alone (having the same Era), some systems may always use Era=0 and only store the ID part (i.e. as UNSIGNED BIGINT in SQL datastores). Note GDID.Zero is never returned by generators as it represents the absence of a value

Namespace: NFX.DataAccess.Distributed
Assembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
Syntax

[SerializableAttribute]
public struct GDID : IDataStoreKey, IComparable<GDID>, 
	IEquatable<GDID>, IComparable, IJSONWritable, IDistributedStableHashProvider
See Also