Re: Bookmark 'stability'

Jon Hanna <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
On 07/18/2012 10:23 PM, Jan Algermissen wrote:
> Hi,
> 
> one of the obligations a server has in a RESTful system (IMHO
> anyway) is to keep those URIs stable that make good bookmarks.
> (as in "Cool URIs don't change"). [1]
> 
> Some questions keep bugging me:
> 
> - Should all URIs a server makes known to clients be considered
>   possible bookmarks?
>   If not, how do I differentiate between those that are and those
>   that are not?

The more remain constant, the better.

I would say:

1. At a minimum, core discovery URIs (those from which you can find the
rest) should remain constant. If it changes, then the old URI should
redirect to the new (permanent or temporary as appropriate).

2. If the "object" identified by a URI is removed, then 410 is
preferable to 404 as this indicates that the reason the URI is not
returning an entity is that something that was once there was removed,
while a 404 doesn't distinguish this from a bug, a client mistake, or
the service restructuring URI mappings.

3. If a large-scale restructuring is done, or a new domain name used,
etc. then the more old URIs that redirect to the new for as long as
possible, the better.

All that said, I think cool URIs can only be an ideal rather than a
guarantee. Using discovery of URIs through HATEOS can mean that in the
worse case of every single URI changing, a client need have only a
single URI updated to return to being fully operational.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.