<?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 for Tristan Media Blog</title>
	<atom:link href="http://blog.tristanmedia.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tristanmedia.com</link>
	<description>One can never have enough scripting languages: Notes on Perl, PHP, and Ruby</description>
	<lastBuildDate>Thu, 08 Dec 2011 19:07:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>Comment on Using Amazon&#8217;s CloudFront with Rails &amp; Paperclip by Michael Hellein</title>
		<link>http://blog.tristanmedia.com/2009/09/using-amazons-cloudfront-with-rails-and-paperclip/comment-page-1/#comment-3099</link>
		<dc:creator>Michael Hellein</dc:creator>
		<pubDate>Thu, 08 Dec 2011 19:07:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=56#comment-3099</guid>
		<description>Also, if you use rand in the Proc above, you&#039;ll be telling browsers to load the same file from different servers on each request, which is obviously not helpful for caching!</description>
		<content:encoded><![CDATA[<p>Also, if you use rand in the Proc above, you'll be telling browsers to load the same file from different servers on each request, which is obviously not helpful for caching!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Amazon&#8217;s CloudFront with Rails &amp; Paperclip by Michael Hellein</title>
		<link>http://blog.tristanmedia.com/2009/09/using-amazons-cloudfront-with-rails-and-paperclip/comment-page-1/#comment-3098</link>
		<dc:creator>Michael Hellein</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:47:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=56#comment-3098</guid>
		<description>I haven&#039;t tried using Paperclip with Cloudfront yet, but I was also considering something like Mike Larkin is suggesting to get around the requests-per-domain bottleneck. However, I don&#039;t think his approach will work, as the string interpolation should only happen once when the model is loaded. (Or am I mistaken?)

Fortunately, :s3_host_alias also takes a Proc, so you could do:

:s3_host_alias =&gt; Proc.new { &quot;cdn#{rand(4)}.pixellent.com&quot; }

I also don&#039;t know if I would use rand, because you&#039;d get a more even distribution by repeatedly iterating from 0-n (where n is the number of domains). On some percentage of requests, rand will give us all the same domain, and then we&#039;d have no performance gain!</description>
		<content:encoded><![CDATA[<p>I haven't tried using Paperclip with Cloudfront yet, but I was also considering something like Mike Larkin is suggesting to get around the requests-per-domain bottleneck. However, I don't think his approach will work, as the string interpolation should only happen once when the model is loaded. (Or am I mistaken?)</p>
<p>Fortunately, :s3_host_alias also takes a Proc, so you could do:</p>
<p>:s3_host_alias =&gt; Proc.new { "cdn#{rand(4)}.pixellent.com" }</p>
<p>I also don't know if I would use rand, because you'd get a more even distribution by repeatedly iterating from 0-n (where n is the number of domains). On some percentage of requests, rand will give us all the same domain, and then we'd have no performance gain!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Amazon&#8217;s CloudFront with Rails &amp; Paperclip by Colin Adams</title>
		<link>http://blog.tristanmedia.com/2009/09/using-amazons-cloudfront-with-rails-and-paperclip/comment-page-1/#comment-1462</link>
		<dc:creator>Colin Adams</dc:creator>
		<pubDate>Tue, 03 May 2011 00:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=56#comment-1462</guid>
		<description>Thanks for this. I was looking for S3 stuff, but the &quot;:default_style =&gt; :original&quot; came in handy!</description>
		<content:encoded><![CDATA[<p>Thanks for this. I was looking for S3 stuff, but the ":default_style => :original" came in handy!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Amazon&#8217;s CloudFront with Rails &amp; Paperclip by Dave Rapin</title>
		<link>http://blog.tristanmedia.com/2009/09/using-amazons-cloudfront-with-rails-and-paperclip/comment-page-1/#comment-1216</link>
		<dc:creator>Dave Rapin</dc:creator>
		<pubDate>Fri, 04 Mar 2011 16:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=56#comment-1216</guid>
		<description>Great writeup, thanks a lot. Especially found the timestamp based on *file* modified date useful for cloudfront.

I&#039;m using this for the next version (still in development) of my open source photographer portfolio (http://grokphoto.org)</description>
		<content:encoded><![CDATA[<p>Great writeup, thanks a lot. Especially found the timestamp based on *file* modified date useful for cloudfront.</p>
<p>I'm using this for the next version (still in development) of my open source photographer portfolio (<a href="http://grokphoto.org" rel="nofollow">http://grokphoto.org</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Amazon&#8217;s CloudFront with Rails &amp; Paperclip by Scott Carleton</title>
		<link>http://blog.tristanmedia.com/2009/09/using-amazons-cloudfront-with-rails-and-paperclip/comment-page-1/#comment-1170</link>
		<dc:creator>Scott Carleton</dc:creator>
		<pubDate>Fri, 18 Feb 2011 01:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=56#comment-1170</guid>
		<description>Barry,

Thanks for this post.  Exactly what I was looking for!</description>
		<content:encoded><![CDATA[<p>Barry,</p>
<p>Thanks for this post.  Exactly what I was looking for!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails 3, RSpec, Mongoid and Database Cleaner by Rafael Lima</title>
		<link>http://blog.tristanmedia.com/2010/07/rails-3-rspec-and-database-cleaner/comment-page-1/#comment-394</link>
		<dc:creator>Rafael Lima</dc:creator>
		<pubDate>Wed, 18 Aug 2010 19:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=88#comment-394</guid>
		<description>If you do not use seed, you can try the code below

  config.before(:each) do
    Mongoid.master.collections.select {&#124;c&#124; c.name !~ /system/ }.each(&amp;:drop)
  end</description>
		<content:encoded><![CDATA[<p>If you do not use seed, you can try the code below</p>
<p>  config.before(:each) do<br />
    Mongoid.master.collections.select {|c| c.name !~ /system/ }.each(&amp;:drop)<br />
  end</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rails 3, RSpec, Mongoid and Database Cleaner by Louis Rose</title>
		<link>http://blog.tristanmedia.com/2010/07/rails-3-rspec-and-database-cleaner/comment-page-1/#comment-290</link>
		<dc:creator>Louis Rose</dc:creator>
		<pubDate>Wed, 28 Jul 2010 15:55:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=88#comment-290</guid>
		<description>Thanks very much! This is exactly what I was after, and you saved me some time wrestling with these gems. Cheers!</description>
		<content:encoded><![CDATA[<p>Thanks very much! This is exactly what I was after, and you saved me some time wrestling with these gems. Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Amazon&#8217;s CloudFront with Rails &amp; Paperclip by Barry</title>
		<link>http://blog.tristanmedia.com/2009/09/using-amazons-cloudfront-with-rails-and-paperclip/comment-page-1/#comment-181</link>
		<dc:creator>Barry</dc:creator>
		<pubDate>Tue, 13 Apr 2010 21:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=56#comment-181</guid>
		<description>Mike, I find just using the CDN is fast enough, and I want people&#039;s browsers to cache all of my assets.  Your approach means they might get a different URL for an asset every time they visit one of my pages, so that I end up paying more for outgoing bandwidth.</description>
		<content:encoded><![CDATA[<p>Mike, I find just using the CDN is fast enough, and I want people's browsers to cache all of my assets.  Your approach means they might get a different URL for an asset every time they visit one of my pages, so that I end up paying more for outgoing bandwidth.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Amazon&#8217;s CloudFront with Rails &amp; Paperclip by Mike Larkin</title>
		<link>http://blog.tristanmedia.com/2009/09/using-amazons-cloudfront-with-rails-and-paperclip/comment-page-1/#comment-180</link>
		<dc:creator>Mike Larkin</dc:creator>
		<pubDate>Tue, 13 Apr 2010 19:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=56#comment-180</guid>
		<description>Excellent write up!  One thing I&#039;d suggest would be to use multiple CNAMEs to serve assets -- most browsers limit simultaneous connections to a subdomain to a max of 2, so if you use something like cnd0, cdn1, cdn2, cdn3, you can speed things up a bit:

:s3_host_alias =&gt; &quot;cdn#{rand(4)}.pixellent.com&quot;</description>
		<content:encoded><![CDATA[<p>Excellent write up!  One thing I'd suggest would be to use multiple CNAMEs to serve assets -- most browsers limit simultaneous connections to a subdomain to a max of 2, so if you use something like cnd0, cdn1, cdn2, cdn3, you can speed things up a bit:</p>
<p>:s3_host_alias =&gt; "cdn#{rand(4)}.pixellent.com"</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Amazon&#8217;s CloudFront with Rails &amp; Paperclip by Barry</title>
		<link>http://blog.tristanmedia.com/2009/09/using-amazons-cloudfront-with-rails-and-paperclip/comment-page-1/#comment-111</link>
		<dc:creator>Barry</dc:creator>
		<pubDate>Fri, 29 Jan 2010 18:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=56#comment-111</guid>
		<description>Hello, Cameron.  It doesn&#039;t work that way.  The interpolation is using attachment.instance_read(:updated_at).to_i so it only changes if the file changes, not if anything else on the model changes.  The problem you describe only happens if you are relying on Model.updated_at for the interpolation.</description>
		<content:encoded><![CDATA[<p>Hello, Cameron.  It doesn't work that way.  The interpolation is using attachment.instance_read(:updated_at).to_i so it only changes if the file changes, not if anything else on the model changes.  The problem you describe only happens if you are relying on Model.updated_at for the interpolation.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

