Hey all, wanted to run a quick sanity check by you.
I’m building an analytics database and I need to generate random IDs for sessions in the app server. To achieve better compression in the database, I don’t want to use UUID strings there but I’d rather use UInt64 data types.
So I’m left with the question of what’s the best way to generate random UInt64 values? Here’s my current approach:
def random_uint64() do :crypto.strong_rand_bytes(8) |> :binary.decode_unsigned() end
Any obvious issues with doing this?