4 ms·
How about solutions like https://hashids.org/ https://hashids.org/ which let you keep auto increment intger PKs and present the IDs to the users in a obfuscated
by ccll 4y ago
How about solutions like https://hashids.org/ https://hashids.org/ which let you keep auto increment intger PKs and present the IDs to the users in a obfuscated string form?
- nszceta 4y agoIt sounds like GP encountered UUID Version 4 keys. UUID version 7 features a time-ordered value field derived from the widely implemented and well known Unix Epoch timestamp source, the number of milliseconds seconds since midnight 1 Jan 1970 UTC, leap seconds excluded. As well as improved entropy characteristics over versions 1 or 6. If your use case requires greater granularity than UUID vesion 7 can provide, you might consider UUID version 8. UUID version 8 doesn't provide as good entropy characteristics as UUID version 7, but it utilizes timestamp with nanosecond level of precision.
- yrro 4y agoWaiting patiently for these new UUID versions to be supported by uuid(1) or Python...
- ttfkam 4y ago> Both UUIDv8 and UUIDv4 only specify that the version and variant bits are in their correct location. The difference is that UUIDv4 specifies that the remaining 122 bits be pseudo-randomly generated. UUIDv8 suggests that the generated value still be time-based however the implementation details of how that generation happens are up to the implementor. This means we have 48 bits of custom implementation, four bits for the version (1000), 12 more bits of custom implementation, two bits for the variant, and finally 62 bits as the implementation sees fit. This leaves a lot open to the implementor but it has enough rules around it that it can coexist in the existing UUID environment. https://blog.devgenius.io/analyzing-new-unique-identifier-formats-uuidv6-uuidv7-and-uuidv8-d6cc5cd7391a https://blog.devgenius.io/analyzing-new-unique-identifier-fo... In other words, one CAN implement a UUIDv8 with nanosecond precision, but that is not a requirement of UUIDv8. 4 is random. 8 is a custom grab bag.