Streams: a new general purpose data structure in Redis
here is an approach i successfully used before:
since timestamps are read from clock the epoch could be a persisted value and a few nibbles could be used for the instance id and a sequential number. with that you get 64bit numbers for easy use and computation without loosing the time information at the cost of a simple transformation function. it simplifies the interface much and generally makes things faster.<p>many clients will even not need that timestamp anyways.