<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Dear Cloud API, your fault line is showing</title>
	<atom:link href="http://stage.vambenepe.com/archives/1504/feed" rel="self" type="application/rss+xml" />
	<link>http://stage.vambenepe.com/archives/1504</link>
	<description>William Vambenepe&#039;s stage</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:33:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: William Vambenepe &#8212; Cloud APIs are like military parades</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-913</link>
		<dc:creator>William Vambenepe &#8212; Cloud APIs are like military parades</dc:creator>
		<pubDate>Tue, 25 Jan 2011 05:40:09 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-913</guid>
		<description>[...] Speaking of people I admire, Shlomo Swidler (&#8220;in general, only library developers use the raw HTTP. Everyone else uses a library&#8220;) and Joe Arnold (&#8220;library integration (fog / jclouds / libcloud) is more important for new #IaaS providers than an API&#8220;) make the right point. Rather than spending hours obsessing about the finer points of your API, spend the time writing love letters to Mitch and Adrian so they support you in their libraries (also, allocate less of your design time to RESTfulness and more to the less glamorous subject of error handling). [...] </description>
		<content:encoded><![CDATA[<p>[...] Speaking of people I admire, Shlomo Swidler (&#8220;in general, only library developers use the raw HTTP. Everyone else uses a library&#8220;) and Joe Arnold (&#8220;library integration (fog / jclouds / libcloud) is more important for new #IaaS providers than an API&#8220;) make the right point. Rather than spending hours obsessing about the finer points of your API, spend the time writing love letters to Mitch and Adrian so they support you in their libraries (also, allocate less of your design time to RESTfulness and more to the less glamorous subject of error handling). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Amundsen</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-912</link>
		<dc:creator>Mike Amundsen</dc:creator>
		<pubDate>Fri, 28 May 2010 13:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-912</guid>
		<description>Gary/William:

Making additional error information available to clients is not a big ask. Sure, sometimes it is impossible for the server to supply that info (e.g. the server doesn&#039;t get the request, intermediary strips it out, the server dies) and sometimes the client will ignore the response (e.g. client doesn&#039;t recognize the format, client dies, etc.). But these are exception cases that are handled in the normal course of things. HTTP is, by design, an unreliable protocol.

I used the word &quot;should&quot; (not &quot;must&quot;) and, if it makes folks feel better, I&#039;d be happy to adjust that to &quot;Whenever reasonably possible servers should...&quot; as it doesn&#039;t change the state of affairs at all.

Now, I will grant you some Web frameworks make it hard for developers to inject meaningful content into error response bodies, but that&#039;s a matter for the framework folks, not the protocol.

Finally, as William already pointed out, using a Link , rel=&quot;error&quot; is a fine way to sidestep lots of payload issues and still provide clients additional helpful information.</description>
		<content:encoded><![CDATA[<p>Gary/William:</p>
<p>Making additional error information available to clients is not a big ask. Sure, sometimes it is impossible for the server to supply that info (e.g. the server doesn&#8217;t get the request, intermediary strips it out, the server dies) and sometimes the client will ignore the response (e.g. client doesn&#8217;t recognize the format, client dies, etc.). But these are exception cases that are handled in the normal course of things. HTTP is, by design, an unreliable protocol.</p>
<p>I used the word &#8220;should&#8221; (not &#8220;must&#8221;) and, if it makes folks feel better, I&#8217;d be happy to adjust that to &#8220;Whenever reasonably possible servers should&#8230;&#8221; as it doesn&#8217;t change the state of affairs at all.</p>
<p>Now, I will grant you some Web frameworks make it hard for developers to inject meaningful content into error response bodies, but that&#8217;s a matter for the framework folks, not the protocol.</p>
<p>Finally, as William already pointed out, using a Link , rel=&#8221;error&#8221; is a fine way to sidestep lots of payload issues and still provide clients additional helpful information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William (@vambenepe on Twitter)</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-911</link>
		<dc:creator>William (@vambenepe on Twitter)</dc:creator>
		<pubDate>Fri, 28 May 2010 04:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-911</guid>
		<description>Thanks for the good comment Gary. Though I would say that if the network is down at the client side there is nothing the API spec or the server implementation can do to help you. But I guess the underlying point you are making is that the client needs to be ready to handle not-in-the-API-spec faults anyway. Which is indeed true.

Interestingly, soon after Mike posted his comment he and I had a little back-and-forth on Twitter that was along the same lines as your comment. See: &lt;a href=&quot;http://twitter.com/vambenepe/status/14818956534&quot; rel=&quot;nofollow&quot;&gt;me&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/mamund/status/14820223994&quot; rel=&quot;nofollow&quot;&gt;him&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/vambenepe/status/14820569706&quot; rel=&quot;nofollow&quot;&gt;me&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/mamund/status/14820689673&quot; rel=&quot;nofollow&quot;&gt;him&lt;/a&gt;.

As you can see, his solution to the unclear/unsuitable media type is to use a link header w/ rel=&quot;error&quot;.</description>
		<content:encoded><![CDATA[<p>Thanks for the good comment Gary. Though I would say that if the network is down at the client side there is nothing the API spec or the server implementation can do to help you. But I guess the underlying point you are making is that the client needs to be ready to handle not-in-the-API-spec faults anyway. Which is indeed true.</p>
<p>Interestingly, soon after Mike posted his comment he and I had a little back-and-forth on Twitter that was along the same lines as your comment. See: <a href="http://twitter.com/vambenepe/status/14818956534" rel="nofollow">me</a>, <a href="http://twitter.com/mamund/status/14820223994" rel="nofollow">him</a>, <a href="http://twitter.com/vambenepe/status/14820569706" rel="nofollow">me</a>, <a href="http://twitter.com/mamund/status/14820689673" rel="nofollow">him</a>.</p>
<p>As you can see, his solution to the unclear/unsuitable media type is to use a link header w/ rel=&#8221;error&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-910</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Fri, 28 May 2010 02:01:20 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-910</guid>
		<description>&quot;Error responses should always carry a message body and that message body should be in the media-type expected by the client (JSON, HTML, XML, CSV, etc.).&quot;

That&#039;s a big ask. If you&#039;ve got a web-server passing a request to an app-server, and the app-server dies, then how can the web-server have any idea what format that URL call is expected to return.

What if the web service offers a response in either XML or JSON, depending on a parameter, and the client specifies an invalid parameter.

And that&#039;s assuming the client request even makes it to the requested web-server. What about the network being down at the client end.

I would say that, as a client calling a web service, you need to first cater for all the HTTP errors, and then a generic &quot;does the response conform to an expected format&quot;, and then any specified error response structure.</description>
		<content:encoded><![CDATA[<p>&#8220;Error responses should always carry a message body and that message body should be in the media-type expected by the client (JSON, HTML, XML, CSV, etc.).&#8221;</p>
<p>That&#8217;s a big ask. If you&#8217;ve got a web-server passing a request to an app-server, and the app-server dies, then how can the web-server have any idea what format that URL call is expected to return.</p>
<p>What if the web service offers a response in either XML or JSON, depending on a parameter, and the client specifies an invalid parameter.</p>
<p>And that&#8217;s assuming the client request even makes it to the requested web-server. What about the network being down at the client end.</p>
<p>I would say that, as a client calling a web service, you need to first cater for all the HTTP errors, and then a generic &#8220;does the response conform to an expected format&#8221;, and then any specified error response structure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Amundsen</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-909</link>
		<dc:creator>Mike Amundsen</dc:creator>
		<pubDate>Thu, 27 May 2010 00:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-909</guid>
		<description>Error responses should always carry a message body and that message body should be in the media-type expected by the client (JSON, HTML, XML, CSV, etc.). 

The error message body is an important _addition_ to the HTTP response code and can carry any interesting data API designers consider important including a link to another resource that can carry even more details (whether a generic help message or details real-time logging data).

In a recent blog post (http://amundsen.com/blog/archives/1054) I discussed a generic version of an error message that can be easily adapted to any media-type.

This same approach is covered in better detail in the &quot;RESTful Web Services Cookbook&quot; by Subbu Allamaraju.</description>
		<content:encoded><![CDATA[<p>Error responses should always carry a message body and that message body should be in the media-type expected by the client (JSON, HTML, XML, CSV, etc.). </p>
<p>The error message body is an important _addition_ to the HTTP response code and can carry any interesting data API designers consider important including a link to another resource that can carry even more details (whether a generic help message or details real-time logging data).</p>
<p>In a recent blog post (<a href="http://amundsen.com/blog/archives/1054" rel="nofollow">http://amundsen.com/blog/archives/1054</a>) I discussed a generic version of an error message that can be easily adapted to any media-type.</p>
<p>This same approach is covered in better detail in the &#8220;RESTful Web Services Cookbook&#8221; by Subbu Allamaraju.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Loughran</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-908</link>
		<dc:creator>Steve Loughran</dc:creator>
		<pubDate>Wed, 26 May 2010 18:22:13 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-908</guid>
		<description>One problem here is that it is really hard to specify in advance what the failure modes will be, as they are often implementation issues -if you change the back end, the errors change. What is good is for people to list their existing errors, and have an error format in which errors have some unique ID (like a URI) into which other people implementing the API can re-use the errors, or insert new ones. the original SOAPFault, not the 1.2 version, is a good starting point, now we need a JsonFault that is similar.</description>
		<content:encoded><![CDATA[<p>One problem here is that it is really hard to specify in advance what the failure modes will be, as they are often implementation issues -if you change the back end, the errors change. What is good is for people to list their existing errors, and have an error format in which errors have some unique ID (like a URI) into which other people implementing the API can re-use the errors, or insert new ones. the original SOAPFault, not the 1.2 version, is a good starting point, now we need a JsonFault that is similar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Maguire</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-907</link>
		<dc:creator>Tom Maguire</dc:creator>
		<pubDate>Wed, 26 May 2010 17:42:09 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-907</guid>
		<description>I absolutely agree that failure modes and behavior is a point of tight coupling..... Some of the most insidious kind...</description>
		<content:encoded><![CDATA[<p>I absolutely agree that failure modes and behavior is a point of tight coupling&#8230;.. Some of the most insidious kind&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William (@vambenepe on Twitter)</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-906</link>
		<dc:creator>William (@vambenepe on Twitter)</dc:creator>
		<pubDate>Wed, 26 May 2010 08:03:31 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-906</guid>
		<description>Thanks for the comment Steve. Interesting point on the &quot;fault behavior as a lock-in mechanism&quot;, I hadn&#039;t thought of that. Now you&#039;re going to have me suspect nefarious intent where I only saw laziness before...

Reading your comment, I remembered the &lt;a href=&quot;http://1060.org/blogxter/entry?publicid=12CE2B62F71239349F3E9903EAE9D1F0&amp;token=&quot; rel=&quot;nofollow&quot;&gt;Cloud Tools Manifesto&lt;/a&gt; that you wrote a while ago and which contains much of what I describe here. I am pretty sure a lot of my thinking on this traces back to when I read that entry on your blog, and the practical confirmations I&#039;ve seen since.</description>
		<content:encoded><![CDATA[<p>Thanks for the comment Steve. Interesting point on the &#8220;fault behavior as a lock-in mechanism&#8221;, I hadn&#8217;t thought of that. Now you&#8217;re going to have me suspect nefarious intent where I only saw laziness before&#8230;</p>
<p>Reading your comment, I remembered the <a href="http://1060.org/blogxter/entry?publicid=12CE2B62F71239349F3E9903EAE9D1F0&#038;token=" rel="nofollow">Cloud Tools Manifesto</a> that you wrote a while ago and which contains much of what I describe here. I am pretty sure a lot of my thinking on this traces back to when I read that entry on your blog, and the practical confirmations I&#8217;ve seen since.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Loughran</title>
		<link>http://stage.vambenepe.com/archives/1504#comment-905</link>
		<dc:creator>Steve Loughran</dc:creator>
		<pubDate>Wed, 26 May 2010 07:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://stage.vambenepe.com/?p=1504#comment-905</guid>
		<description>Obviously I agree with this: the faults are the most interesting part of the API as compared to the &quot;success&quot; response, errors are by quantity the largest proportion of the responses you can get from a service. Because they are the rarest, they are also bonded to the client-side code that doesn&#039;t get tested enough.

0. Service APIs must provide some machine parseable response. Soap faults aren&#039;t that bad a design to start from.

1. Service APIs must document all known errors, with parseable examples.

2. Mock service endpoints should be provided to simulate failures like asking for some machines and getting you card declined, or asking for 500 machines and getting back 12.

There&#039;s some interesting politics here, because failure mode handling becomes the barrier to moving between apparently identical API implementations; just because Eucalyptus implements the EC2 API doesn&#039;t mean it fails in the same way.</description>
		<content:encoded><![CDATA[<p>Obviously I agree with this: the faults are the most interesting part of the API as compared to the &#8220;success&#8221; response, errors are by quantity the largest proportion of the responses you can get from a service. Because they are the rarest, they are also bonded to the client-side code that doesn&#8217;t get tested enough.</p>
<p>0. Service APIs must provide some machine parseable response. Soap faults aren&#8217;t that bad a design to start from.</p>
<p>1. Service APIs must document all known errors, with parseable examples.</p>
<p>2. Mock service endpoints should be provided to simulate failures like asking for some machines and getting you card declined, or asking for 500 machines and getting back 12.</p>
<p>There&#8217;s some interesting politics here, because failure mode handling becomes the barrier to moving between apparently identical API implementations; just because Eucalyptus implements the EC2 API doesn&#8217;t mean it fails in the same way.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

