{"id":1966,"date":"2008-02-20T02:20:51","date_gmt":"2008-02-20T06:20:51","guid":{"rendered":"http:\/\/www.markbaker.ca\/blog\/2008\/02\/20\/simpledb-did-screw-up\/"},"modified":"2008-02-20T02:20:51","modified_gmt":"2008-02-20T06:20:51","slug":"simpledb-did-screw-up","status":"publish","type":"post","link":"http:\/\/www.markbaker.ca\/blog\/2008\/02\/simpledb-did-screw-up\/","title":{"rendered":"SimpleDB did screw up"},"content":{"rendered":"<p><a href=\"http:\/\/www.oreillynet.com\/xml\/blog\/2008\/02\/the_simpledb_epiphany_i_finall.html\">David Peterson defends<\/a>\n<a href=\"http:\/\/www.amazon.com\/b?ie=UTF8&#038;node=342335011\">SimpleDB<\/a>&#8216;s\n<a href=\"http:\/\/www.25hoursaday.com\/weblog\/2007\/12\/21\/AmazonSimpleDBTheGoodTheBadAndTheUgly.aspx\">use of HTTP GET for\nmutation actions<\/a> by appealing to the HTTP spec itself, specifically\n<a href=\"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec8.html#sec8.1.2.2\">pipelining<\/a> where it says;<\/p>\n\n<blockquote cite=\"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec8.html#sec8.1.2.2\">\nClients SHOULD NOT pipeline requests using non-idempotent methods or non-idempotent sequences of methods (see section 9.1.2). Otherwise, a premature termination of the transport connection could lead to indeterminate results. A client wishing to send a non-idempotent request SHOULD wait to send that request until it has received the response status for the previous request.\n<\/blockquote>\n\n<p>His argument is that because POST isn&#8217;t idempotent, that it couldn&#8217;t be used for pipelining, and therefore that GET could be used.  There&#8217;s two fatal flaws with this argument however.  The first is that PUT is idempotent, and is also a mutator, so you can pipeline that no problem (modulo the concern about sequences of requests).  The second is that if both the client and server understand that an &#8220;Action&#8221; parameter specifies the actual action to be taken (overriding the HTTP method), then if Action specifies a non-idempotent method, you&#8217;re still going to run into the same indeterminism problem that the HTTP spec warns against: what matters is the <em>effective<\/em> method of the message, not only the HTTP method.<\/p>\n\n<p>It&#8217;s also interesting that the example Dare uses is of an Action value &#8220;PutAttributes&#8221;, which is presumably idempotent, doh!<\/p>\n\n<p>Nope, Amazon blew it, <a href=\"http:\/\/www.awszone.com\/scratchpads\/aws\/ecs.us\/CartCreate.aws\">again<\/a>.  I&#8217;ve offered them my <a href=\"http:\/\/www.coactus.com\">services<\/a> a couple times already, but they&#8217;ve not taken me up on my offer yet.  They really, really(!) should before they publish another service.<\/p>","protected":false},"excerpt":{"rendered":"David Peterson defends SimpleDB&#8216;s use of HTTP GET for mutation actions by appealing to the HTTP spec itself, specifically pipelining where it says; Clients SHOULD NOT pipeline requests using non-idempotent methods or non-idempotent sequences of methods (see section 9.1.2). Otherwise, a premature termination of the transport connection could lead to indeterminate results. A client wishing [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[22,40],"class_list":["post-1966","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-rest","tag-xml"],"_links":{"self":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/1966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/comments?post=1966"}],"version-history":[{"count":0,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/1966\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/media?parent=1966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/categories?post=1966"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/tags?post=1966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}