lshift/diffa — pull request #278 by anthonyls (2012-11-27 11:19:14+00:00)
Title: A mechanism for generating globally unique IDs in the context of distributed nodes.

Very much akin to Twitter Snowflake

Scope

* performance
* machine identifier-specific ID generation (assume given machine ID)

Acceptance Criteria

* performance: > 1 million identifiers per second
* generate at time T an ID that has a timestamp component of T
* generate an ID that has a machine ID component matching the generating ID Broker
* generate the first ID with a sequence component of 0
* generate a second ID for the same timestamp with a sequence component of 1
* generate the (k+1)th ID for the same timestamp with a sequence component of k
* serialise requests to generate an ID
* generate k-ordered identifiers over a period
* generate only unique identifiers, even when time runs backwards