-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
I maintain the Python version[0] of this TSID spec[1]. Using it in several projects and I'm very happy with the result.
[0] https://github.com/luismedel/tsid-python
-
-
https://github.com/grantcarthew/awesome-unique-id
Here's a great list of many IDs if you haven't got enough dillema on what to use
-
I went to add your UUID variant to my notes and found https://github.com/jetify-com/typeid
The main differences:
- typeid allows up to a 63 byte prefix
-
> Again I understand, most people don't seem to care about that, because they were born into cloud culture and have no clue what they are doing in terms of efficiency money/resource-wise.
They have no clue about how computers work, full stop. Sure, they know programming languages, but generally speaking, if you ask them about IOPS, disk or network latency, NUMA, cache lines, etc. they’ll tell you it doesn’t matter, and has been abstracted away for them. Or worse, they’ll say sub-optimal code is fine because shipping is all that matters.
There is certainly a difference between sub-optimal and grossly un-optimized code. Agonizing over a few msec outside of hot loops is probably not worthwhile from an efficiency standpoint, but if it's trivial to do correctly, why not do it correctly? One recent shocking example I found was `libuuid` in its various forms. util-linux's implementation [0] at its most recent tag is shockingly slow in larger loops. I'm fairly certain it's due to entropy exhaustion, but I haven't looked into it enough yet.
MacOS uses arc4random [1] (which for Linux, is in glibc as of v2.36, but you can get it from libbsd-dev otherwise), and it's much, much faster (again, on large loops).
I made some small C programs and a shell runner to demonstrate this [2].
[0]: https://github.com/util-linux/util-linux/blob/stable/v2.40/l...
[1]: https://man7.org/linux/man-pages/man3/arc4random.3.html
[2]: https://gist.github.com/stephanGarland/f6b7a13585c0caf9eb64b...
-
typeid-elixir
Elixir implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
I’m a little late to the conversation, but I’m using the Elixir version of TypeID[0] in my project. While the repo linked to above doesn’t provide any guidance on storing the TypeIDs, the Elixir version does this really well. You store the prefix in the your schema (model) code, but the underlying database column is simply a UUIDv7.
So when you call the new function, it will generate a UUIDv7, base32 encode it, and then prepend the prefix. Then at the database layer it will translate that to a UUIDv7 for storing and translate back to the string version when loading.
[0] https://github.com/sloanelybutsurely/typeid-elixir
Related posts
-
Show HN: A Directory of Free, Open Source Alternatives to Popular Software
-
OpenTTD is an open source simulation game based upon Transport Tycoon Deluxe
-
A Beginner's Guide to Docker Compose for Developers
-
List of Swatch Internet Time Tools
-
Observing Spin Apps with OpenTelemetry and the .NET Aspire Dashboard