I think this is one of those few cases when there's no cost into having a correct long term solution instead of having to change the format of IDs (and thus having multiple sets of them) in time.
you still didn't tell us your exact use case so we are throwing bunch of out-of-context solutions.
I didn't write the final goal explicitly but I wrote the requirements. The final goal is to traceable unique IDs for events in a distributed system that also are sortable which is a very handy property. There's no mistery to it :D
I agree that exposing IDs is not great, not even UUIDs in theory. In that case is best to have multiple keys.
It's an interesting approach but it's tied to a database. I want something that would work at each level (the programming language, the DB table, an event log and so).
Thanks for sending me suggestions though, it's really great to see all of these approaches!!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I get it.
You wanna have a long-term solution, however, you still didn't tell us your exact use case so we are throwing bunch of out-of-context solutions.
BTW, this might be a very interesting solution (using both UUID and incremental ID): tomharrisonjr.com/uuid-or-guid-as-...
I think this is one of those few cases when there's no cost into having a correct long term solution instead of having to change the format of IDs (and thus having multiple sets of them) in time.
I didn't write the final goal explicitly but I wrote the requirements. The final goal is to traceable unique IDs for events in a distributed system that also are sortable which is a very handy property. There's no mistery to it :D
I agree that exposing IDs is not great, not even UUIDs in theory. In that case is best to have multiple keys.
It's an interesting approach but it's tied to a database. I want something that would work at each level (the programming language, the DB table, an event log and so).
Thanks for sending me suggestions though, it's really great to see all of these approaches!!