<?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: Retrying Operations</title>
	<atom:link href="http://elegantcode.com/2009/06/04/retrying-operations/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2009/06/04/retrying-operations/</link>
	<description></description>
	<lastBuildDate>Sun, 14 Mar 2010 12:04:09 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rinat Abdullin</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-2/#comment-46728</link>
		<dc:creator>Rinat Abdullin</dc:creator>
		<pubDate>Sat, 06 Jun 2009 11:39:25 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46728</guid>
		<description>Retrying actions is a real life-saver, indeed.

I&#039;m using a similar approach to transfer data between application boundaries (i.e.: from repository to DB, while resolving dead-locks, or between client applications and web services, while handling communication exceptions). Ability to inject the specific policy via the IoC from a single place makes it even more easy to 

If you are interested, there is a production-quality open-source library that leverages this concept (with a configuration syntax for retry policies). Here&#039;s the article introducing the retry aspect:

http://abdullin.com/journal/2008/12/1/net-exception-handling-action-policies-application-block.html

BTW, these policies are compatible with policies used in Windows Azure.</description>
		<content:encoded><![CDATA[<p>Retrying actions is a real life-saver, indeed.</p>
<p>I&#8217;m using a similar approach to transfer data between application boundaries (i.e.: from repository to DB, while resolving dead-locks, or between client applications and web services, while handling communication exceptions). Ability to inject the specific policy via the IoC from a single place makes it even more easy to </p>
<p>If you are interested, there is a production-quality open-source library that leverages this concept (with a configuration syntax for retry policies). Here&#8217;s the article introducing the retry aspect:</p>
<p><a href="http://abdullin.com/journal/2008/12/1/net-exception-handling-action-policies-application-block.html" rel="nofollow">http://abdullin.com/journal/2008/12/1/net-exception-handling-action-policies-application-block.html</a></p>
<p>BTW, these policies are compatible with policies used in Windows Azure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arielr</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-2/#comment-46717</link>
		<dc:creator>Arielr</dc:creator>
		<pubDate>Fri, 05 Jun 2009 20:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46717</guid>
		<description>I have a small issue with this - the error thrown after the last retry is the last Exception. I would think about throwing a ExceptionWithExceptions thingie - it might allow invokers to better know what went wrong along the way.

Sorry for nitpicking. :)</description>
		<content:encoded><![CDATA[<p>I have a small issue with this &#8211; the error thrown after the last retry is the last Exception. I would think about throwing a ExceptionWithExceptions thingie &#8211; it might allow invokers to better know what went wrong along the way.</p>
<p>Sorry for nitpicking. <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Rasa</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-2/#comment-46713</link>
		<dc:creator>Tony Rasa</dc:creator>
		<pubDate>Fri, 05 Jun 2009 15:26:52 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46713</guid>
		<description>@Stefano:  because I needed the caller to have synchronous semantics, so i do need the calling thread to be blocked until we succeed or fail.  in this case the timing can be off by hundreds of ms, it doesn&#039;t make much of a difference - i&#039;m just saying wait &#039;for a bit.&#039;  I could have used a Timer, and then a ManualResetEvent and a callback or something to stop until the timer fires, I guess.  

@udi: not really.  I think using msmq for this (and only this) would be overkill.</description>
		<content:encoded><![CDATA[<p>@Stefano:  because I needed the caller to have synchronous semantics, so i do need the calling thread to be blocked until we succeed or fail.  in this case the timing can be off by hundreds of ms, it doesn&#8217;t make much of a difference &#8211; i&#8217;m just saying wait &#8216;for a bit.&#8217;  I could have used a Timer, and then a ManualResetEvent and a callback or something to stop until the timer fires, I guess.  </p>
<p>@udi: not really.  I think using msmq for this (and only this) would be overkill.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop - June 5, 2009 &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-1/#comment-46709</link>
		<dc:creator>Dew Drop - June 5, 2009 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Fri, 05 Jun 2009 12:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46709</guid>
		<description>[...] Retrying Operations (Tony Rasa) [...]</description>
		<content:encoded><![CDATA[<p>[...] Retrying Operations (Tony Rasa) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Udi Dahan</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-1/#comment-46705</link>
		<dc:creator>Udi Dahan</dc:creator>
		<pubDate>Fri, 05 Jun 2009 09:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46705</guid>
		<description>It sounds like you&#039;re trying to implement MSMQ.</description>
		<content:encoded><![CDATA[<p>It sounds like you&#8217;re trying to implement MSMQ.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #362</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-1/#comment-46701</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #362</dc:creator>
		<pubDate>Fri, 05 Jun 2009 07:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46701</guid>
		<description>[...] Retrying Operations - Tony Rasa investigates a reusable way of performing operations which you expect may fail and require retrying [...]</description>
		<content:encoded><![CDATA[<p>[...] Retrying Operations &#8211; Tony Rasa investigates a reusable way of performing operations which you expect may fail and require retrying [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefano Martinz</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-1/#comment-46697</link>
		<dc:creator>Stefano Martinz</dc:creator>
		<pubDate>Fri, 05 Jun 2009 05:12:55 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46697</guid>
		<description>Hi, why not use a Timer, instead of Thread.Sleep? It&#039;d be non-blocking and the timing would be much more reliable. cheers</description>
		<content:encoded><![CDATA[<p>Hi, why not use a Timer, instead of Thread.Sleep? It&#8217;d be non-blocking and the timing would be much more reliable. cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dylan Thomas</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-1/#comment-46696</link>
		<dc:creator>Dylan Thomas</dc:creator>
		<pubDate>Fri, 05 Jun 2009 03:48:17 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46696</guid>
		<description>I remember something similar that Davy Brion did to implement the circuit breaker pattern some time ago. Obviously a slightly different use case, but still close enough to bear looking at: http://davybrion.com/blog/2008/05/the-circuit-breaker/</description>
		<content:encoded><![CDATA[<p>I remember something similar that Davy Brion did to implement the circuit breaker pattern some time ago. Obviously a slightly different use case, but still close enough to bear looking at: <a href="http://davybrion.com/blog/2008/05/the-circuit-breaker/" rel="nofollow">http://davybrion.com/blog/2008/05/the-circuit-breaker/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Van Ryswyck</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-1/#comment-46689</link>
		<dc:creator>Jan Van Ryswyck</dc:creator>
		<pubDate>Thu, 04 Jun 2009 19:28:20 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46689</guid>
		<description>I wrote something similar about a month ago. Glad to see that the solution I came up with matches the one developed by a thought leader. :-). Good stuff.</description>
		<content:encoded><![CDATA[<p>I wrote something similar about a month ago. Glad to see that the solution I came up with matches the one developed by a thought leader. <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . Good stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://elegantcode.com/2009/06/04/retrying-operations/comment-page-1/#comment-46687</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Thu, 04 Jun 2009 18:46:40 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/06/04/retrying-operations/#comment-46687</guid>
		<description>I&#039;ve also done something similar - in addition to the error filter that Jon suggested I also used a retry filter to see if retrying again was appropriate.  I immediately added a MaxAttempts and Timeout filter and ended up adding ones like &quot;ProcessIsRunning&quot; and &quot;MachineIsNotPingable&quot;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve also done something similar &#8211; in addition to the error filter that Jon suggested I also used a retry filter to see if retrying again was appropriate.  I immediately added a MaxAttempts and Timeout filter and ended up adding ones like &#8220;ProcessIsRunning&#8221; and &#8220;MachineIsNotPingable&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
