<?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: Database versus files for Images</title>
	<atom:link href="http://spindrop.us/2009/02/18/database-versus-files-for-images/feed/" rel="self" type="application/rss+xml" />
	<link>http://spindrop.us/2009/02/18/database-versus-files-for-images/</link>
	<description>look at all this code you don't have to write</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:27:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave Dash</title>
		<link>http://spindrop.us/2009/02/18/database-versus-files-for-images/comment-page-1/#comment-193734</link>
		<dc:creator>Dave Dash</dc:creator>
		<pubDate>Thu, 19 Feb 2009 16:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://spindrop.us/?p=225#comment-193734</guid>
		<description>&lt;p&gt;Hi John,&lt;/p&gt;

&lt;p&gt;I think your mechanism of using the DB as a &quot;reverse&quot; cache could work.&lt;/p&gt;

&lt;p&gt;I&#039;m not an expert on file system replication - but it should not be so bad that you would opt for a database, especially for a media library.  I&#039;d be curious as well to know how large the library is.&lt;/p&gt;

&lt;p&gt;Another solution would be this.  Write all new data to disk and memcached.  Fetch from memcached if you can (I&#039;d key the images as URL paths and you could do this straight from your web server) and then handle the misses using the filesystem.  Memcached can be spanned and accessed from multiple servers, furthermore data that hasn&#039;t changed and therefore may no longer be in memcache, should have replicated... if not... you might have some deeper issues.&lt;/p&gt;

&lt;p&gt;Let me know how your implementation goes.  I think it will work, it&#039;s all about benchmarking it to see if it works to your standards.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi John,</p>

<p>I think your mechanism of using the DB as a &#8220;reverse&#8221; cache could work.</p>

<p>I&#8217;m not an expert on file system replication &#8211; but it should not be so bad that you would opt for a database, especially for a media library.  I&#8217;d be curious as well to know how large the library is.</p>

<p>Another solution would be this.  Write all new data to disk and memcached.  Fetch from memcached if you can (I&#8217;d key the images as URL paths and you could do this straight from your web server) and then handle the misses using the filesystem.  Memcached can be spanned and accessed from multiple servers, furthermore data that hasn&#8217;t changed and therefore may no longer be in memcache, should have replicated&#8230; if not&#8230; you might have some deeper issues.</p>

<p>Let me know how your implementation goes.  I think it will work, it&#8217;s all about benchmarking it to see if it works to your standards.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: John Wards</title>
		<link>http://spindrop.us/2009/02/18/database-versus-files-for-images/comment-page-1/#comment-193277</link>
		<dc:creator>John Wards</dc:creator>
		<pubDate>Thu, 19 Feb 2009 08:25:39 +0000</pubDate>
		<guid isPermaLink="false">http://spindrop.us/?p=225#comment-193277</guid>
		<description>&lt;p&gt;Hi Dave,&lt;/p&gt;

&lt;p&gt;We are about to do a media library which will be on N-Servers with load balanced web/file servers. So we are thinking about performance but also replication lag of the file system.&lt;/p&gt;

&lt;p&gt;What we are thinking of doing is saving the files to a database and having a physical pointer on the file system. When that file is requested we use htaccess to test if that file is valid, if not the application will serve the file out of the database and save it in the pointer location. So next time the file will come from the file system.&lt;/p&gt;

&lt;p&gt;The benefit of this solution is we can drop in new file application servers with no replication lag.&lt;/p&gt;

&lt;p&gt;It seems to be the ideal solution, but any feedback would be great.&lt;/p&gt;

&lt;p&gt;Cheers
John&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Dave,</p>

<p>We are about to do a media library which will be on N-Servers with load balanced web/file servers. So we are thinking about performance but also replication lag of the file system.</p>

<p>What we are thinking of doing is saving the files to a database and having a physical pointer on the file system. When that file is requested we use htaccess to test if that file is valid, if not the application will serve the file out of the database and save it in the pointer location. So next time the file will come from the file system.</p>

<p>The benefit of this solution is we can drop in new file application servers with no replication lag.</p>

<p>It seems to be the ideal solution, but any feedback would be great.</p>

<p>Cheers
John</p>]]></content:encoded>
	</item>
</channel>
</rss>
