Update: Subbu Allamaraju has followed up my post with “Idempotency Explained” which is worth a read. I’m not sure if I agree 100% with his comments due to the fact that — as far as I know — the same request to create/edit/update an entry/attribute on SimpleDB will always yield the same result no matter how many times the request was made. Then again, I could very well be completely off base here. /me is reading through the docs again to ensure I haven’t missed something.

Anyone in the know care to clarify one way or another?

Either way, thanks for the extended overview, Subbu!

[Original Post]
So for various reasons I’ve had the opportunity to get to know a lot of the folks who design, develop, deploy, market, and support the various offerings of Amazon Web Services, and it’s because of this I found it funny to hear people criticize Amazon for “setting back web architecture 10 years” with the release of SimpleDB. For example, Dare Obasanjo provided the following commentary,

I’ve talked about APIs that claim to be RESTful but aren’t in the past but Amazon’s takes the cake when it comes to egregious behavior. Again, from the documentation for the PutAttributes method we learn,

<snip/>

Wow. A GET request with a parameter called Action which modifies data? What is this, 2005? I thought we already went through the realization that GET requests that modify data are bad after the Google Web Accelerator scare of 2005?

I’ll admit that at first I was right in line with Dare’s point, or in other words, WTF?

But as I mentioned, I know a lot of these guys personally, and I can assure you not a single one of them could qualify as anything other than the best and brightest this world has to offer as it relates to the field of computer science. So I’ve always held off from criticizing, assuming that eventually it would all make sense.

Apparently eventually =~ February 19th, 2008,

via RFC 2616 section 8.1.2.2,

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 to send a non-idempotent request SHOULD wait to send that request until it has received the response status for the previous request.

To clarify, via Wikipedia,

Only idempotent requests should be pipelined, such as GET and HEAD requests. POST requests should not be pipelined.

To invoke the epiphany,

Amazon SimpleDB is designed from a ground up to support highly parallel applications.

In short, there were no other options: About 99.100% of all libraries built to extend support for SimpleDB are going to be built on top of frameworks such as .NET or Java or etc. in which, being good RFC 2616 compliant citizens would disallow POSTing or PUTing data to SimpleDB via HTTP Pipelines, and as we recently learned via the above linked SimpleDB tutorial,

Amazon SimpleDB is designed from a ground up to support highly parallel applications.

Or in other words, to gain the benefits provided by building highly parallel SimpleDB applications, there was no other option.

Guess maybe it’s time for HTTP 1.2? ;-)