antirez/redis — pull request #295 by pyr (2012-01-13 23:07:50+00:00)
Title: Add a 128-bit k-ordered unique id generator

This is similar to what snowflake and the recent boundary
solution do, but it makes sense to use redis for that type
of use cases for people wanting a simple way to get
incremental ids in distributed systems without an additional
daemon requirement.

Unique IDs are composed as follows:

* epoch seconds: 4 bytes
* epoch mseconds: 4 bytes
* host name: 6 bytes
* sequence id: 2 bytes

host name is truncated to 6 chars, so the appropriate config
directive id-generation-name should be set on each machines
wanting to yield ids if truncating hostname do 6 chars does
not suffice.