<?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: RetriableTask &#8212; a generic wrapper for retrying operations in Java</title>
	<atom:link href="http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/</link>
	<description>Not a typewriter</description>
	<lastBuildDate>Mon, 08 Mar 2010 08:29:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andrew</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-135</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sun, 12 Jul 2009 13:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-135</guid>
		<description>Yep, I can see this might require a slightly different approach if you&#039;re doing webcrawling. In our case, we&#039;re using this to dispatch parallel SOAP messages to various different web services living on different servers, so even before I brought this class in, we were still wrapping all the SOAP client operations in Callables and running them on a thread pool.

As Bob says, it would get more involved if you don&#039;t want multiple threads contacting the same server at once. Although a quick way to adapt this class, for simple cases, would be to use a separate single-threaded executor for each server.

I love the concurrency framework.</description>
		<content:encoded><![CDATA[<p>Yep, I can see this might require a slightly different approach if you&#8217;re doing webcrawling. In our case, we&#8217;re using this to dispatch parallel SOAP messages to various different web services living on different servers, so even before I brought this class in, we were still wrapping all the SOAP client operations in Callables and running them on a thread pool.</p>
<p>As Bob says, it would get more involved if you don&#8217;t want multiple threads contacting the same server at once. Although a quick way to adapt this class, for simple cases, would be to use a separate single-threaded executor for each server.</p>
<p>I love the concurrency framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Carpenter</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-133</link>
		<dc:creator>Bob Carpenter</dc:creator>
		<pubDate>Fri, 10 Jul 2009 20:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-133</guid>
		<description>For web downloads, you often have a whole set of URLs to download.  It&#039;s bad form to run multiple concurrent downloads against the same site/server.

So the usual approach to doing this runs a multi-threaded scheduling priority queue that orders things to download by time-to-next-try and doesn&#039;t allow concurrent downloads from the same site (basically a set-based semaphore setup).  Typically, under errors, there will be some scheme to wait longer before the next try.  And often scheduling that depends on the last time you found fresh content.

I think rzei&#039;s right, that at least a more generic abstract base class (not a whole framework!) might be useful here.  A one-class alternative would be to take a set of exception Class objects, with exceptions in the set not being retried.</description>
		<content:encoded><![CDATA[<p>For web downloads, you often have a whole set of URLs to download.  It&#8217;s bad form to run multiple concurrent downloads against the same site/server.</p>
<p>So the usual approach to doing this runs a multi-threaded scheduling priority queue that orders things to download by time-to-next-try and doesn&#8217;t allow concurrent downloads from the same site (basically a set-based semaphore setup).  Typically, under errors, there will be some scheme to wait longer before the next try.  And often scheduling that depends on the last time you found fresh content.</p>
<p>I think rzei&#8217;s right, that at least a more generic abstract base class (not a whole framework!) might be useful here.  A one-class alternative would be to take a set of exception Class objects, with exceptions in the set not being retried.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A slightly cleaner Java Retryable - mccv</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-104</link>
		<dc:creator>A slightly cleaner Java Retryable - mccv</dc:creator>
		<pubDate>Thu, 28 May 2009 00:30:44 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-104</guid>
		<description>[...] implementation of a class that retries an operation N times before failing. However after reading this post I realized that using Java&#8217;s Callable class cleans things up quite a bit. This completely [...]</description>
		<content:encoded><![CDATA[<p>[...] implementation of a class that retries an operation N times before failing. However after reading this post I realized that using Java&#8217;s Callable class cleans things up quite a bit. This completely [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-103</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Tue, 26 May 2009 09:43:55 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-103</guid>
		<description>@mccv -- It did occur to me as I was writing it that it would be much easier in a language where you could pass function calls around...

Callable is well worth getting to know though, as are ExecutorService, Future and FutureTask. Even if you don&#039;t do industrial-grade concurrency, they give you some handy options for breaking your code into units of work.</description>
		<content:encoded><![CDATA[<p>@mccv &#8212; It did occur to me as I was writing it that it would be much easier in a language where you could pass function calls around&#8230;</p>
<p>Callable is well worth getting to know though, as are ExecutorService, Future and FutureTask. Even if you don&#8217;t do industrial-grade concurrency, they give you some handy options for breaking your code into units of work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mccv</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-102</link>
		<dc:creator>mccv</dc:creator>
		<pubDate>Mon, 25 May 2009 17:36:17 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-102</guid>
		<description>Funny, I had a similar requirement and came up with a similar approach.  My lack of familiarity with Callable shows, as I basically created the same interface.  I put up a post comparing the implementation in Java vs. an implementation in Scala here http://www.themcwongs.com/?p=50</description>
		<content:encoded><![CDATA[<p>Funny, I had a similar requirement and came up with a similar approach.  My lack of familiarity with Callable shows, as I basically created the same interface.  I put up a post comparing the implementation in Java vs. an implementation in Scala here <a href="http://www.themcwongs.com/?p=50" rel="nofollow">http://www.themcwongs.com/?p=50</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-101</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sun, 24 May 2009 18:09:57 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-101</guid>
		<description>@Jkilgrow -- heh, web services are exactly why I wrote this :-)</description>
		<content:encoded><![CDATA[<p>@Jkilgrow &#8212; heh, web services are exactly why I wrote this <img src='http://biotext.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jkilgrow</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-100</link>
		<dc:creator>Jkilgrow</dc:creator>
		<pubDate>Sun, 24 May 2009 14:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-100</guid>
		<description>I wrote something very similar for calling webservices that were particularly unreliable.</description>
		<content:encoded><![CDATA[<p>I wrote something very similar for calling webservices that were particularly unreliable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-99</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sun, 24 May 2009 09:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-99</guid>
		<description>@Marcio -- exactly, that&#039;s what I intended. You get parallelism and timeouts for free that way. I should put mention that in the post really.

@rzei -- sounds like that&#039;s starting to grow into a proper framework rather than a one class solution :-) I&#039;m not sure why you think this method lacks reusability though.</description>
		<content:encoded><![CDATA[<p>@Marcio &#8212; exactly, that&#8217;s what I intended. You get parallelism and timeouts for free that way. I should put mention that in the post really.</p>
<p>@rzei &#8212; sounds like that&#8217;s starting to grow into a proper framework rather than a one class solution <img src='http://biotext.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I&#8217;m not sure why you think this method lacks reusability though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcio</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-98</link>
		<dc:creator>Marcio</dc:creator>
		<pubDate>Sat, 23 May 2009 17:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-98</guid>
		<description>@florin

Because it&#039;s a Callable nothing stops you from executing it in an ExecutorService.</description>
		<content:encoded><![CDATA[<p>@florin</p>
<p>Because it&#8217;s a Callable nothing stops you from executing it in an ExecutorService.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: florin</title>
		<link>http://biotext.org.uk/retriabletask-a-generic-wrapper-for-retrying-operations-in-java/comment-page-1/#comment-97</link>
		<dc:creator>florin</dc:creator>
		<pubDate>Sat, 23 May 2009 15:38:53 +0000</pubDate>
		<guid isPermaLink="false">http://biotext.org.uk/?p=360#comment-97</guid>
		<description>Wouldn&#039;t you want this in its own thread, asynchronously especially if you put a timer on it? Also, a callback might be needed rather than a return on the call() method.</description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t you want this in its own thread, asynchronously especially if you put a timer on it? Also, a callback might be needed rather than a return on the call() method.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
