Type Prefixes for IDs #133
alexchristy
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, as I am finishing the view-range-endpoints changes, all IDs for all objects have been switched to integers to improve Postgres performance. However, this can be confusing for users.
For example, the ID: 1 can point to a user, blueprint range/vpc/subnet/host, or even a deployed range and in the future might even point to snapshots or other resources/objects.
I propose that we prefix IDs so that it communicates to the user what the ID references similar to what AWS does (instance ID: i-34hf93fj843jf or vpc-0c7b142a1b707369e).
To keep the performance improvements of integer primary keys in Postgres, I think the IDs can be translated in the FastAPI layer.
Beta Was this translation helpful? Give feedback.
All reactions