Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Use UUID-s as the identifiers #2336

Closed
majkrzak opened this issue Sep 12, 2023 · 3 comments
Closed

Feature Request: Use UUID-s as the identifiers #2336

majkrzak opened this issue Sep 12, 2023 · 3 comments

Comments

@majkrzak
Copy link

I suggest using UUID instead of auto increment integers.

Automatically incremented integers have couple of drawbacks. Beside more serious one like possibility of overflowing to some security issue regarding the possibility of enumerating entities. For me most important factor against it are pedantic reasons. Removing entities create gaps which can not be filled as id's can not be modified. Additionally they introduce unnatural order of entities, which as above can not be modified. We can end up with tomato more important than onion with empty space after cucumber.

UUID (or simillar) does not share those problems with only drawback of being 128 bit's long. It also can be considered as advantage thou.

@berrnd
Copy link
Member

berrnd commented Sep 12, 2023

Beside more serious one like possibility of overflowing to some security issue regarding the possibility of enumerating entities

pedantic reasons

Grocy is about helping with practical relevant problems, not the theoretical ones and the target use case is your home. So what's the practically relevant and drastic security issue you think about, while keeping that target use case in mind?

 

Removing entities create gaps which can not be filled as id's can not be modified

ID's are not meant to be beautiful, they serve a technical purpose, nothing more and else.

 

Additionally they introduce unnatural order of entities

Ordering never happens by id, but by the column you or the the user chooses (most of the time a column named name by default).

 

We can end up with tomato more important than onion with empty space after cucumber.

Don't know how "important" is related to id's at all...

 

drawback of being 128 bit's long

So we waste twice the amount (even more for real-world-common small values) an integer takes while also having something less human readable (at least relevant when debugging stuff) - yeah, we need that, not.

 

Off topic question: Do you even use Grocy in your daily life and that's the most important issue you have?

@berrnd berrnd closed this as completed Sep 12, 2023
@majkrzak

This comment was marked as off-topic.

@berrnd

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants