I would like to discuss alternatives for the generation of unique identifiers, in the context of URLs, database primary keys/no-sql keys, system interoperation, etc., etc.
I used GUIDs in the past, which for simplicity I stored them in its string representation instead of using the byte/long representation. Do we have something other than UUID (16byte/36chars) to create identifiers? Does exist a shorter (ie. 8byte) UUID version? I know its uniqueness comes from the extra bits, but maybe a shorter display string can be used (as git commits does, but with 20 bytes) or directly less bytes like MongoDB's OID (12 byte). I'm thinking about unique identifiers in the context of different systems (and different languages), where datatype limitations can exist. E.g. Java's long is 2^64 -1, 8byte, SQLite can only store 8byte integers. So the most standard generator, least common denominator type would be the best approach. By now, the "least worst" solution I found is to keep using the 36 char string representation for persistence/serialization (JSON). But I'm sure there must be something else much more clever. What do you use for IDs? Regards, Esteban. Esteban A. Maringolo