<?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: W3Counter Grows Again</title>
	<atom:link href="http://www.dangrossman.info/2008/07/17/w3counter-grows-again/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dangrossman.info/2008/07/17/w3counter-grows-again/</link>
	<description>Entrepreneur and web developer</description>
	<lastBuildDate>Wed, 08 Feb 2012 22:53:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Bookmarks about Storage</title>
		<link>http://www.dangrossman.info/2008/07/17/w3counter-grows-again/comment-page-1/#comment-62211</link>
		<dc:creator>Bookmarks about Storage</dc:creator>
		<pubDate>Sun, 24 Aug 2008 04:00:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/?p=239#comment-62211</guid>
		<description>[...] - bookmarked by 5 members originally found by dperkel on 2008-08-03  W3Counter Grows Again  http://www.dangrossman.info/2008/07/17/w3counter-grows-again/ - bookmarked by 4 members originally [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; bookmarked by 5 members originally found by dperkel on 2008-08-03  W3Counter Grows Again  <a href="http://www.dangrossman.info/2008/07/17/w3counter-grows-again/" rel="nofollow">http://www.dangrossman.info/2008/07/17/w3counter-grows-again/</a> &#8211; bookmarked by 4 members originally [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.dangrossman.info/2008/07/17/w3counter-grows-again/comment-page-1/#comment-60937</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 18 Jul 2008 18:49:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/?p=239#comment-60937</guid>
		<description>There are two types of requests the W3Counter web server gets -- hits to tracker.php to serve the counter image and log a visit to a website, and requests for a report on a website. In either case, the website ID to act on is always part of the URL.

The first thing that&#039;s done in either case is to query a lookup table that has (at least) two columns: website id, and server id. This is the table that keeps track of what websites are on what database servers. The server id&#039;s correspond to connection names in the databases.yml file, so the script can connect to the correct database to record a visit or generate a report.

It&#039;s basic horizontal partitioning of the database. The table structures on each DB server are identical, so it&#039;s just a matter of knowing which server has the rows you&#039;re looking for. A few functions have to connect to every database to generate their report, like the summary screen shown after login that lists all websites in an account and some basic stats for each, as a user&#039;s websites may be spread across multiple servers. In that case it&#039;s just a loop over all the databases in the config file.</description>
		<content:encoded><![CDATA[<p>There are two types of requests the W3Counter web server gets &#8212; hits to tracker.php to serve the counter image and log a visit to a website, and requests for a report on a website. In either case, the website ID to act on is always part of the URL.</p>
<p>The first thing that&#8217;s done in either case is to query a lookup table that has (at least) two columns: website id, and server id. This is the table that keeps track of what websites are on what database servers. The server id&#8217;s correspond to connection names in the databases.yml file, so the script can connect to the correct database to record a visit or generate a report.</p>
<p>It&#8217;s basic horizontal partitioning of the database. The table structures on each DB server are identical, so it&#8217;s just a matter of knowing which server has the rows you&#8217;re looking for. A few functions have to connect to every database to generate their report, like the summary screen shown after login that lists all websites in an account and some basic stats for each, as a user&#8217;s websites may be spread across multiple servers. In that case it&#8217;s just a loop over all the databases in the config file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendon Kozlowski</title>
		<link>http://www.dangrossman.info/2008/07/17/w3counter-grows-again/comment-page-1/#comment-60929</link>
		<dc:creator>Brendon Kozlowski</dc:creator>
		<pubDate>Fri, 18 Jul 2008 16:22:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/?p=239#comment-60929</guid>
		<description>Dan, glad to see you getting back in to the swing of things with your blogging.  I remember when you discussed extending the database to multiple servers via code awhile back using a configuration &quot;DB lookup&quot; file.  I know Symfony uses YAML for most of its configuration, but...  Can you explain (in a quick summarized manner) how you went about doing this?  I think this might be beneficial to others, if you have the time.</description>
		<content:encoded><![CDATA[<p>Dan, glad to see you getting back in to the swing of things with your blogging.  I remember when you discussed extending the database to multiple servers via code awhile back using a configuration &#8220;DB lookup&#8221; file.  I know Symfony uses YAML for most of its configuration, but&#8230;  Can you explain (in a quick summarized manner) how you went about doing this?  I think this might be beneficial to others, if you have the time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

