[occi-wg] OCCI MC - State Machine Diagram

Sam Johnston samj at samj.net
Thu May 14 12:14:51 CDT 2009


On Thu, May 14, 2009 at 7:07 PM, Tim Bray <Tim.Bray at sun.com> wrote:

> 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.


A key use case for this is having brain-dead user agents like curl (from
cron) and failover scripts being able to push buttons routinely or in an
emergency. Putting a clear plastic lid over such things is standard practice
in engineering circles... same may as well apply here.

Do you have any comments as to the suitability of
states-as-a-collection-of-nouns per Seth's suggestion on your post? As I
said above, sounds elegant but complicated and probably unnecessary in this
concext (can't think of a use case that needs this, let alone an important
one)... I have no problems whatsoever with write-only resources.

Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/occi-wg/attachments/20090514/dd85ac2e/attachment.html 


More information about the occi-wg mailing list