[katello-devel] Modelling of environments, products, etc in Katello (related to renaming of environments)

Dmitri Dolguikh dmitri at redhat.com
Tue Aug 14 11:37:06 UTC 2012


On 14/08/12 12:05 PM, Jan Pazdziora wrote:
> On Tue, Aug 14, 2012 at 11:49:45AM +0100, Dmitri Dolguikh wrote:
>> The original resource still exists, only its location has changed.
>> Since we cannot know how API clients use resource urls, how long
>> they keep them around, etc, we either: have to return the resource,
>> its new location, or notify the user that the resource in question
>> has been deleted. That is the reason why http response codes
>> differentiate between "not found" (404) and "permanently moved"
>> (301).
>> Think how many times you followed a link and got a 404, only to
>> discover later that it still exists, but at a different URL? Let's
>> not contribute to this problem.
> How do you propose to solve situation when you have a resource
>
> 	prod
>
> and it gets renamed to
>
> 	prod-old
>
> and then the admin wants to create new resource named
>
> 	prod
>
> ? Will you allow them to create that resource with this name (breaking
> the expectation because the new prod content might be completely
> different), or will the (now) prod-old occupy the prod name forever?
I would not allow the user to create new resource named 'prod', as it 
would introduce ambiguity.
>
> What is the difference between renaming prod to prod-old, and removing
> prod and creating prod-old with the same content?
>
> The labels are just a human readable names assigned to resources.
labels remain human-readable only in a subset of all locales. With a 
completely non-ascii based locale, the labels will be anything but human 
readable. Think Russian, Chinese, Japanese, Korean, etc.
> If
> the admin on the server decides that the
>
> 	prod
>
> label should now point to different object, why stop them?
Because something, somewhere is possibly using the url before change to 
point to the original resource. Now it's pointing to a completely 
different resource, and there's no way to notify the user of the change.
>
> By the way, why not use a dual addressing scheme -- you can have
>
> 	id/the-UUID-or-any-other-generated-non-semantic-id
>
> and
>
> 	label/prod
>
> point to the same resource? Here the first will likely be used
> internally and could be used by the super careful user who want to
> protect from any label manipulation, and the second one would be used
> by users who trust the admin and they always want to use their
> production environment, no matter if it was just created from scratch
> or renamed three times in the mean time.
Why introduce TWO ways to identify a resource, one of them non-uniquely, 
if we can use a url + search for resource based on metadata (labels, 
names, what have you).

-d
>





More information about the katello-devel mailing list