The GUID/UUID data type is great for replacing the numerical ID of a record with something that can stand up to the challenges of distributed data, but they are not very suitable for use by the end-user. In some applications you really do still want to be able to generate a reliable numerical sequence number, such as for an invoice number. […] It may seem like overkill to add an additional component to our software stack just to handle the task of keeping a counter, but Redis fits the mould perfectly in this case. Its also simple to setup and use, not adding much to the solution’s overhead. Especially considering that, like CouchDB, the redis instance is “in the cloud”.
I do feel this is overkill and one could generate the sequence at the application level. And even if there is a proposed feature for adding a 128-Bit K-ordered unique id generator to Redis, for high scale decentralized ID generation one should look into Twitter’s Snowflake or Boundary’s Flake.
Original title and link: Generating Numerical Sequences With Redis ( ©myNoSQL)
After posting about the proposal of adding a 128-bit K-Order unique id generator to Redis, I’ve realized I haven’t linked to Boundary’s post about Flake, their decentralized k-ordered unique id generator project:
All that is required to construct such an id is a monotonically increasing clock and a location 3. K-ordering dictates that the most-significant bits of the id be the timestamp. UUID-1 contains this information, but arranges the pieces in such a way that k-ordering is lost. Still other schemes offer k-ordering with either a questionable representation of ‘location’ or one that requires coordination among nodes.
Original title and link: Flake: An Erlang Decentralized, K-Ordered Unique ID Generator by Boundary ( ©myNoSQL)
Interesting pull request submitted to Redis by Pierre-Yves Ritschard:
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.
Snoflake is the network service for generating unique ID numbers at high scale used (and open sourced) by Twitter. Flake is an Erlang decentralized, k-ordered id generation service open sourced by Boundary.
Original title and link: Redis: Adding a 128-Bit K-Ordered Unique Id Generator ( ©myNoSQL)