[occi-wg] OCCI MC - State Machine Diagram

Tim Bray Tim.Bray at Sun.COM
Thu May 14 12:07:01 CDT 2009


On May 14, 2009, at 9:53 AM, Sam Johnston wrote:

> Here's the rule (http://www.w3.org/TR/webarch/#safe-interaction):   
> "Agents do not incur obligations by retrieving a representation."
>
> That is to say, spiders and pre-fetching proxies and so on are  
> perfectly entitled to GET any link they see, and if mayhem ensues,  
> it's the server's fault, not the client.  People often say "GET  
> should not cause a change in state" which is wrong, because it  
> writes logfile entries and sets cookies and all sorts of stuff.
>
> Ok so I guess I mis-parsed the part of your post where you said "The  
> reboot and halt buttons don’t really have any state, so you  
> shouldn’t expect anything useful from a GET". I'm guessing a "POST"  
> is the best way to "push" a button then?

Right.  I was getting whining from people about the notion of a "write- 
only resource" and I was pushing back, saying "What's the problem with  
that?  If there's a red  button on the side of a machine that makes it  
restart when you push it, the button has no meaningful state, you can  
only push it"

So yes, I think POST is a good choice for an actuator.  If you look at  
the discussion in http://www.tbray.org/ongoing/When/200x/2009/03/20/Rest-Casuistry 
  and then the comments, you'll see that people proposed a bunch of  
other ideas, some of them quite clever and some verging on the  
metaphysical, but I think that just doing a POST hits a nice 80/20  
point both in terms of comprehensibility for the client and  
tractability for the implementor.

  -Tim



More information about the occi-wg mailing list