-
Notifications
You must be signed in to change notification settings - Fork 27
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
New queues can't be created with the deleted queue names #178
Comments
Hi @Trinankur This was a intentional design constraint we took. Queue names are used in queue url, hence should be unique. We enforce it as a DB constraint. When the queue is deleted, we only do soft deletes, as we might still need to let our clients have a log of people who had been in the queue. |
Understood, although this is a very good implementation but what if we could generate the url by hashing the queue name and queue id. That would take away the url constraint and only let the signed up users to have unique Queue name to let them investigate the queue if needed later. Because some users might abuse the system and use up all the good queue names that a client might have used. Not able to create a queue with a queue name of their choice might put some clients off. |
That's a great idea, simplicity was the reason we kept the current scheme. Let's discuss and develop your idea further.
The unique queue name constraint is forcing the user to naturally create distinct queue names by using dates. Thsi is indirectly helping him indirectly distinguish between past queues. In your proposed new scheme, one way around this might be to have a uniqueness constraint on (queueName, ownerId).
One thing that quickly comes to my mind is to have a auto-incrementing number for each owner as the owner id and then use it in the queue url:
Let me know other ways around this, if you can come up with. Can the hash function generate human friendly short names without collision? Else can we generate shorter ids like how other url shortness does it? Then we can use it instead of our long UUID for queue IDs directly and then relax requirement (2). |
I was thinking of prepopulating 6 - 8 char long randomly generated base64 keys and keeping them in the db, which we can associate with the queues as and when created. This could prevent collisions. When a queue is deleted we can remove the association with key and the key will be available to associate with a different queue. Let me know what do you think. |
Hi,
Not sure if this is a feature or an issue. I am not clear as to why once a queue having a certain queue name is deleted, a new queue with the same name can't be created again.
The text was updated successfully, but these errors were encountered: