How can universally unique primary keys can be generated ?
filed in C# on Feb.24, 2010
The generic solution is to generate a 32 digit key, encoded in hexadecimal composed as follows: 1: Unique down to the millisecond. Digits 1-8 are the hex encoded lower 32 bits of the System.DateTime.Now.Millisecond() call. 2: Unique across a cluster. Digits 9-16 are the encoded representation of the 32 bit integer of the underlying IP [...]