by jfdjkfdhjds · 2y ago · 0 comments
and then a small hash with base64 or 37 or whatever is in vogue these days.
thats what old timers used before uuid 1.
guess we should guerilla standardize something like this as uuid-0 or uuid-deprecated-2.0 for keeping up with the spirit.
The problem with auto-increment integer ids is they are not always possible with distributed systems.
I wouldn't use it for assigning bank account numbers, but for most web or app stuff it's fine.
I'm fairly certain the first rule of websec is you never trust the client. I definitely would not trust a user's browser to directly insert a value into a DB.
> What if you don't know how many nodes you have?
Shouldn't matter; you have a centralized system that hands out chunks of IDs on-demand (and has its own mechanism to ensure no repeats). This is similar to what Vitess [0] does.
[0]: https://vitess.io/docs/20.0/reference/features/vitess-sequen...
The real benefit of UUIDs is the 'consistency' of the one-size-fits-most approach. If you can do without IDs humans can read out, or readable plain text logs, or compressibility, or recognisable formats for different types of ID? Then UUIDs can be used for anything from customer orders to web requests to log lines.