<?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: Downloading a bunch of files in parallel using Clojure Agents</title>
	<atom:link href="http://freegeek.in/blog/2009/10/downloading-a-bunch-of-files-in-parallel-using-clojure-agents/feed/" rel="self" type="application/rss+xml" />
	<link>http://freegeek.in/blog/2009/10/downloading-a-bunch-of-files-in-parallel-using-clojure-agents/</link>
	<description>The Chronicles of Nerd-nia</description>
	<lastBuildDate>Sun, 22 Aug 2010 10:52:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Steve Miner</title>
		<link>http://freegeek.in/blog/2009/10/downloading-a-bunch-of-files-in-parallel-using-clojure-agents/comment-page-1/#comment-425</link>
		<dc:creator>Steve Miner</dc:creator>
		<pubDate>Mon, 16 Aug 2010 19:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=80#comment-425</guid>
		<description>If you don&#039;t want to accidentally drop any elements, use partition-all (in Clojure 1.2) instead of partition.

(partition-all 3 (range 7))   ==&gt;  ((0 1 2) (3 4 5) (6))

Also, in Clojure 1.2, partition can take additional args to specify the step and pad so this will work:

(partition 3 3 nil (range 7))  ==&gt; ((0 1 2) (3 4 5) (6))</description>
		<content:encoded><![CDATA[<p>If you don&#8217;t want to accidentally drop any elements, use partition-all (in Clojure 1.2) instead of partition.</p>
<p>(partition-all 3 (range 7))   ==&gt;  ((0 1 2) (3 4 5) (6))</p>
<p>Also, in Clojure 1.2, partition can take additional args to specify the step and pad so this will work:</p>
<p>(partition 3 3 nil (range 7))  ==&gt; ((0 1 2) (3 4 5) (6))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Cabana</title>
		<link>http://freegeek.in/blog/2009/10/downloading-a-bunch-of-files-in-parallel-using-clojure-agents/comment-page-1/#comment-295</link>
		<dc:creator>David Cabana</dc:creator>
		<pubDate>Tue, 12 Jan 2010 05:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=80#comment-295</guid>
		<description>Something to watch out for, by example. Evaluate (partition 3 (range 7)) and you will see that is it is ((0 1 2) (3 4 5)).  Notice the missing element 6.  

Your example partitions the urls into blocks of 15. If the number of urls to be downloaded is not evenly divisible by 15 you will miss some.</description>
		<content:encoded><![CDATA[<p>Something to watch out for, by example. Evaluate (partition 3 (range 7)) and you will see that is it is ((0 1 2) (3 4 5)).  Notice the missing element 6.  </p>
<p>Your example partitions the urls into blocks of 15. If the number of urls to be downloaded is not evenly divisible by 15 you will miss some.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baishampayan</title>
		<link>http://freegeek.in/blog/2009/10/downloading-a-bunch-of-files-in-parallel-using-clojure-agents/comment-page-1/#comment-294</link>
		<dc:creator>Baishampayan</dc:creator>
		<pubDate>Thu, 31 Dec 2009 12:01:15 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=80#comment-294</guid>
		<description>Daniel,
Thanks for stopping by :) I agree with you. I could have used fill-queue for this,  could then download a new file as soon as one has finished instead of waiting for the whole bunch to be done.

I will probably post a new version which uses fill-queue instead.

And Happy New Year to you too!</description>
		<content:encoded><![CDATA[<p>Daniel,<br />
Thanks for stopping by <img src='http://freegeek.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I agree with you. I could have used fill-queue for this,  could then download a new file as soon as one has finished instead of waiting for the whole bunch to be done.</p>
<p>I will probably post a new version which uses fill-queue instead.</p>
<p>And Happy New Year to you too!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Werner</title>
		<link>http://freegeek.in/blog/2009/10/downloading-a-bunch-of-files-in-parallel-using-clojure-agents/comment-page-1/#comment-293</link>
		<dc:creator>Daniel Werner</dc:creator>
		<pubDate>Wed, 30 Dec 2009 17:46:17 +0000</pubDate>
		<guid isPermaLink="false">http://freegeek.in/blog/?p=80#comment-293</guid>
		<description>Nice, I could have used exactly such a download tool just this week. Thanks for sharing.

One thing that immediately hit me upon seeing &quot;partition&quot; is that your code does download files of the same partition in parallel, but (apply await agnts) will force all downloads to complete before the next partition is even considered.

Tom Faulhaber showed how to use fill-queue in a doseq to process HTTP requests in a queue without blocking newly incoming requests. You might be able to adapt this pattern to your needs:

http://infolace.blogspot.com/2009/08/simple-webhooks-with-clojure-and-ring.html

Oh, and have a happy 2010!</description>
		<content:encoded><![CDATA[<p>Nice, I could have used exactly such a download tool just this week. Thanks for sharing.</p>
<p>One thing that immediately hit me upon seeing &#8220;partition&#8221; is that your code does download files of the same partition in parallel, but (apply await agnts) will force all downloads to complete before the next partition is even considered.</p>
<p>Tom Faulhaber showed how to use fill-queue in a doseq to process HTTP requests in a queue without blocking newly incoming requests. You might be able to adapt this pattern to your needs:</p>
<p><a href="http://infolace.blogspot.com/2009/08/simple-webhooks-with-clojure-and-ring.html" rel="nofollow">http://infolace.blogspot.com/2009/08/simple-webhooks-with-clojure-and-ring.html</a></p>
<p>Oh, and have a happy 2010!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.263 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-08-25 04:44:57 -->
