I agree.  I think that when the discussion starts to turn around which  
HTTP verbs map best to the idiosyncracies of relational databases  
(like safe transactional ID assignment for rows) it is a hint to try  
mapping REST onto the application at a higher abstraction level.  REST  
styles often work more naturally for high level object constructs,  
which also tend to have corresponding real-world unique identifiers.   
As the abstraction level gets higher, I find it both improves the fit  
to representational concepts, and raises the likelihood of having a  
way of deterministically arriving at URIs specific to the real world  
problem domain.

The most successful and widely adopted REST APIs seem to me to use  
natural semantic concepts, URIs included.

If the application just involves using Restlet as an implementation  
detail of a private client/server system in a controlled environment,  
then I would not fret too much about verb choice and other details as  
long as it makes sense to the implementer and maintainers, and works  
well in practice.

On Dec 25, 2009, at 9:07 PM, Niclas Hedhman <[email protected]> wrote:

>
> Huh? It is for the container to hand each client a different ID. I  
> think you have the assumptions that IDs must be in unbroken numbered  
> sequence. Seldom is that a requirement.
>
> -- Niclas
>
>> On 24 Dec 2009 18:57, "Ben R Vesco" <[email protected]> wrote:
>>
>> The client using a GET request to find an id to use for a PUT would
>> have all the problems of non-atomic operations (since it can't
>> possibly be atomic). What if two clients both call GET at the same
>> time to get the *next* id to insert? What if N clients call GET to  
>> get
>> the next id to insert but never do the PUT? PUT to a specific id is
>> really only truly useful when the id is deterministic.
>> On Tue, Dec 22, 2009 at 8:33 PM, Niclas Hedhman  
>> <[email protected]> wrote: > On Wed, Dec 23, 2009...
>>
>> ------------------------------------------------------
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2432842
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2433228

Reply via email to