<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Always Get Better &#187; internet</title>
	<atom:link href="http://www.alwaysgetbetter.com/blog/category/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alwaysgetbetter.com/blog</link>
	<description>Never stop looking for ways to improve</description>
	<lastBuildDate>Mon, 30 Jan 2012 12:00:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adobe Aquires Typekit</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/10/03/adobe-aquires-typekit/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/10/03/adobe-aquires-typekit/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 18:17:23 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=452</guid>
		<description><![CDATA[Today Adobe announced its acquisition of Typekit, a web font hosting service that allows designers to use any typeface with their sites rather than relying on standard &#8220;safe&#8221; font families. This is an interesting development. Adobe&#8217;s Flash player already supports proprietary fonts, which suggests that the company is looking at alternate technologies for its future [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Today Adobe announced its acquisition of Typekit, a web font hosting service that allows designers to use any typeface with their sites rather than relying on standard &#8220;safe&#8221; font families.</p>
<p>This is an interesting development. Adobe&#8217;s Flash player already supports proprietary fonts, which suggests that the company is looking at alternate technologies for its future development. Obviously Flash will remain relevant for more time to come, but as competitors increasingly jump onto the HTML5 bandwagon, Adobe is wise to increase its arsenal of standards-compliant technology.</p>
<div style="width:468px;margin:0 auto">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-0410364841759590";
/* Homepage, 468x60 ads, After posts, created 12/19/08 */
google_ad_slot = "4210204644";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/10/03/adobe-aquires-typekit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Upgrade Firefox using Ubuntu</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/08/06/upgrade-firefox-ubuntu/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/08/06/upgrade-firefox-ubuntu/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 18:57:43 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web Browsers]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=441</guid>
		<description><![CDATA[photo credit: jmerelo So I got tired of using Firefox 3.6 in my Ubuntu machine and decided to upgrade to the newest version (5.0). It&#8217;s understandable that the package maintainers responsible for Ubuntu don&#8217;t put bleeding-edge cutting-edge releases in the distribution due to the possibility of introducing unstable elements into the user experience. But Firefox [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/29/finding-ubuntu-version/' rel='bookmark' title='Finding Your Ubuntu Version'>Finding Your Ubuntu Version</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class=alignright><a href="http://www.flickr.com/photos/48600078653@N01/164408290/" title="Mochila Firefox" target="_blank"><img src="http://farm1.static.flickr.com/51/164408290_c1404c94fe_m.jpg" alt="Mochila Firefox" border="0" /></a><br /><small><a href="http://creativecommons.org/licenses/by-sa/2.0/" title="Attribution-ShareAlike License" target="_blank"><img src="http://www.alwaysgetbetter.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/48600078653@N01/164408290/" title="jmerelo" target="_blank">jmerelo</a></small></div>
<p>So I got tired of using Firefox 3.6 in my Ubuntu machine and decided to upgrade to the newest version (5.0). It&#8217;s understandable that the package maintainers responsible for Ubuntu don&#8217;t put <del datetime="2011-08-06T18:45:00+00:00">bleeding-edge</del> cutting-edge releases in the distribution due to the possibility of introducing unstable elements into the user experience. But Firefox 4 has been out for over a year, and the migration to 5 is well underway.</p>
<p>Fortunately, it couldn&#8217;t be much easier to get the newest official release using our good friend <strong>aptitude</strong>.</p>
<p>In a terminal window, add the Mozilla team&#8217;s stable Firefox repository by issuing the following command:</p>
<p><code><br />
sudo add-apt-repository ppa:mozillateam/firefox-stable<br />
</code></p>
<p>Next, perform an update to get the package listing, and upgrade to install the newest browser:</p>
<p><code><br />
sudo apt-get update<br />
sudo apt-get upgrade<br />
</code></p>
<p>That&#8217;s it &#8211; you&#8217;re done! Your shortcuts are even updated, and any bookmarks or open tabs you might have had on the go are carried forward.</p>
<p>I was pleasantly surprised at how easy this process was.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/29/finding-ubuntu-version/' rel='bookmark' title='Finding Your Ubuntu Version'>Finding Your Ubuntu Version</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/08/06/upgrade-firefox-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Surviving Cloud Failures</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 03:21:12 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[redundancy]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=411</guid>
		<description><![CDATA[photo credit: Don Fulano Amazon is in the news today for the failure their Elastic Block Storage (EBS) service suffered, resulting in loss of service and/or extreme latency for hundreds of sites including some of their largest customers like Foursquare and reddit. AWS has been widely regarded as the most stable and overall leader of [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/' rel='bookmark' title='Cloud Computing Is Not Magical'>Cloud Computing Is Not Magical</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/' rel='bookmark' title='Drizzle &#8211; MySQL for the Cloud'>Drizzle &#8211; MySQL for the Cloud</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/' rel='bookmark' title='Small Site, Big Footprint'>Small Site, Big Footprint</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class=alignright><a href="http://www.flickr.com/photos/27384730@N00/109566859/" title="Fixed" target="_blank"><img src="http://farm1.static.flickr.com/49/109566859_898dd5de4e_m.jpg" alt="Fixed" border="0" /></a><br /><small><a href="http://creativecommons.org/licenses/by-sa/2.0/" title="Attribution-ShareAlike License" target="_blank"><img src="http://www.alwaysgetbetter.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/27384730@N00/109566859/" title="Don Fulano" target="_blank">Don Fulano</a></small></div>
<p>Amazon is in the news today for the failure their Elastic Block Storage (EBS) service suffered, resulting in loss of service and/or extreme latency for hundreds of sites including some of their largest customers like Foursquare and reddit. AWS has been widely regarded as the most stable and overall leader of the cloud providers, so it was a great shock to many observers that they were able to suffer such a large failure.</p>
<p>I think the failure is not surprising, but rather the fact that it hasn&#8217;t happened before now is surprising. It underscores my message that <a href="http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/">cloud computing is not magical</a> but is in fact an abstraction over very real hardware. There are bound to be flaws and issues just as with &#8220;real&#8221; hosting options, the difference is the end customer has less control over the hardware, hosting and networking environment.</p>
<p>Not every business can afford the overhead of a large dedicated solution, so what to do?</p>
<p><strong>Spread the Load</strong><br />
The key is redundancy. Start by <a href="http://www.alwaysgetbetter.com/blog/2011/04/21/accelerate-site-content-delivery-network/">spreading your content</a> across the internet rather than relying on  single server to cough up all of your visitors&#8217; needs. Things like content delivery networks (CDNs) will reduce the incoming load on the server and help it stay online.</p>
<p>How can we tell if a website is offloading the right amount of content? <a href="http://www.alwaysgetbetter.com/blog/2011/04/19/tracking-website-speed-problems/">Perform regular speed testing</a> and identify problem areas using tools like YSlow.</p>
<p><strong>Redundancy! Eliminate Single Points of Failure</strong><br />
Whenever you have a single system servicing part of your application, you expose the entire application to failure.</p>
<p>For example, suppose you have four Apache servers and <a href="http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/">a load balancer</a> sending equal traffic to each. If one of the Apache servers fails, the other three are able to compensate for the loss with no downtime for your visitors. But what happens if the load balancer fails? Even though all four web servers are in fine working order, your site is knocked offline.</p>
<p>Some systems are difficult to cluster: replication schemes in the various SQL servers are a huge drain on performance &#8211; newer solutions like MySQL Cluster or <a href="http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/">DrizzleDB</a> aim to solve this problem, but at extra expense in terms of configuration and application design.</p>
<p>The key to successful redundancy is in scripting your software in such a way that failures can be recovered from fast and automatically. Having a hot spare in the group isn&#8217;t useful if you need to reach an administrator at 4am to activate &#8211; by that point you&#8217;ve already lost your overseas customers for the day.</p>
<p>Twilio has <a href="http://www.twilio.com/engineering/2011/04/22/why-twilio-wasnt-affected-by-todays-aws-issues/">an excellent summary</a> of the engineering process that goes into creating a scalable cloud-ready infrastructure.</p>
<p><strong>Avoid the Cloud? Never</strong><br />
Despite some public failures, cloud computing has not suffered any kind of blow. Large organizations will always want their own private non-cloud hosting, small sites will always be looking for an inexpensive VWS. The middle-tier which is serviced by the cloud will continue to see cost savings that greatly outweigh any physical hosting options available at that level.</p>
<p>Because of the low server cost, cloud computing allows smart customers the freedom to build necessary redundancy without breaking the bank. Even though this pays off big time when catastrophic failures happen, there are longer term benefits of improved overall response times to the end users even when the hosting is working well.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/' rel='bookmark' title='Cloud Computing Is Not Magical'>Cloud Computing Is Not Magical</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/' rel='bookmark' title='Drizzle &#8211; MySQL for the Cloud'>Drizzle &#8211; MySQL for the Cloud</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/' rel='bookmark' title='Small Site, Big Footprint'>Small Site, Big Footprint</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Small Site, Big Footprint</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 01:47:57 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=391</guid>
		<description><![CDATA[photo credit: orinoko42 I like redundancy, to a fault. Part of it goes to my need for comprehensive backup &#8211; as long as you have a backup prepared, you are less likely to lose anything. So it stands to reason that if you have two identical copies of your web site running, you are more [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/21/accelerate-site-content-delivery-network/' rel='bookmark' title='Accelerate Your Site with a Content Delivery Network'>Accelerate Your Site with a Content Delivery Network</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/' rel='bookmark' title='Cloud Computing Is Not Magical'>Cloud Computing Is Not Magical</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class=alignright><a href="http://www.flickr.com/photos/15161049@N06/5557586589/" title="footprint" target="_blank"><img src="http://farm6.static.flickr.com/5298/5557586589_d54f03a99b_m.jpg" alt="footprint" border="0" /></a><br /><small><a href="http://creativecommons.org/licenses/by/2.0/" title="Attribution License" target="_blank"><img src="http://www.alwaysgetbetter.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/15161049@N06/5557586589/" title="orinoko42" target="_blank">orinoko42</a></small></div>
<p>I like redundancy, to a fault. Part of it goes to <a href="http://www.alwaysgetbetter.com/blog/2011/04/15/backup-time/">my need for comprehensive backup</a> &#8211; as long as you have a backup prepared, you are less likely to lose anything. So it stands to reason that if you have two identical copies of your web site running, you are more tolerant to all kinds of failures &#8211; from your web server going down to an unexpected surge in traffic.</p>
<p><strong>Protection Against Hardware Failure</strong><br />
If your server <a href="http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/">experiences hardware issues</a>, nothing you can do (short of changing the faulty components) will keep your site online. If you have two web servers and one of them fails, the other can still pick up the slack.</p>
<p>This is an important consideration when you&#8217;re using <a href="http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/">a cloud provider</a>. In many cases you only occupy a small portion of the hardware you are hosting on, which means if someone else messes up their VM instance it can potentially affect your application. Spreading across to two VMs increases the odds that you end up on different physical hardware, perhaps even a different server rack altogether. If your provider performs maintenance on one of their servers you will not necessarily get knocked offline.</p>
<p><strong>Protection Against Traffic</strong><br />
Even if you&#8217;re on a strong fast server, you can only support a certain number of concurrent users. A load balancing situation can reduce the average load per machine in your cluster, which improves the overal response rate, and eliminates the &#8216;queuing&#8217; problem you would experience with a large numbers of users all trying to hit a particular machine.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/21/accelerate-site-content-delivery-network/' rel='bookmark' title='Accelerate Your Site with a Content Delivery Network'>Accelerate Your Site with a Content Delivery Network</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/' rel='bookmark' title='Cloud Computing Is Not Magical'>Cloud Computing Is Not Magical</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Tuning Apache</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/12/performance-tuning-apache/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/12/performance-tuning-apache/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 10:31:21 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=376</guid>
		<description><![CDATA[photo credit: comedy_nose One of my favourite aspects of the cloud is the ease with which we can create new VMs to test our wacky architecture theories. It&#8217;s so easy (and cheap!) to spin up a small server cluster for some serious load testing, and then destroy it again when done. If nothing else, it [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/12/20/fastcgi-nginx-performance-vm/' rel='bookmark' title='Using FastCGI with Nginx for Performance on a VM'>Using FastCGI with Nginx for Performance on a VM</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class=alignright><a href="http://www.flickr.com/photos/23408922@N07/5596445582/" title="Project 365 #95: 060411 The View From Below" target="_blank"><img src="http://farm6.static.flickr.com/5141/5596445582_6f5f41dbff_m.jpg" alt="Project 365 #95: 060411 The View From Below" border="0" /></a><br /><small><a href="http://creativecommons.org/licenses/by/2.0/" title="Attribution License" target="_blank"><img src="http://www.alwaysgetbetter.com/blog/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/23408922@N07/5596445582/" title="comedy_nose" target="_blank">comedy_nose</a></small></div>
<p>One of my favourite aspects of <a href="http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/">the cloud</a> is the ease with which we can create new VMs to test our wacky architecture theories. It&#8217;s so easy (and cheap!) to spin up a small server cluster for some serious load testing, and then destroy it again when done.</p>
<p>If nothing else, it provides a safety net and teaches you how to squeeze every ounce of performance out of big and small server instances. Let&#8217;s examine ways in which we can make our dynamic Apache settings much faster.</p>
<p><strong>Turn Off Modules You&#8217;re Not Using</strong><br />
This should be fairly obvious, but Apache ships with a number of modules which can affect performance but which most of us never need. Check your <em>/etc/apache/mods-enabled</em> folder to see what can be removed.</p>
<p><strong>Never Trust Defaults</strong><br />
The default Apache settings are optimized for a website serving static files only. Booorrring! Never be afraid to question what you see in the configuration files; the more you understand about the inner workings of the system, the better you will be able to improve its performance.</p>
<p><strong>RAM is good, Swap is Bad</strong><br />
Running out of physical memory (RAM) and hitting the hard drive&#8217;s swap space is bad, especially in the Virtual Machine world. When this happens your performance will nose dive; your machine may even crash. The simplest solution is to increase the amount of RAM available to your server, but if that is too costly or impossible, read on.</p>
<p><strong>Kill the KeepAlive</strong><br />
Whenever a request is made to the web server, it keeps the network connection open for a small amount of time (often 15 seconds). During that time, if the visitor&#8217;s web browser needs to get another file, it goes through the same connection thereby avoiding wasting time re-connecting to your server. The problem is the open connection will use up space in your connection pool so if your site is under heavy load new visitors will get queued up and may experience slowdowns trying to access your content.</p>
<p>If Apache is your front-end web server, set the <em>KeepAliveTimeout</em> to 2 seconds. This will keep the number of requests fluid even under heavy load.</p>
<p>If your server is behind a firewall like nginx or HAProxy where KeepAlives are not honoured, turn this setting off entirely.</p>
<p><strong>Don&#8217;t Serve Static Files</strong><br />
Apache is a memory hog. Since each hit to the server is relatively heavy in terms of threads and memory, we are in better shape when we serve non-changing static content like images, stylesheets and javascript <a href="http://www.alwaysgetbetter.com/blog/2010/09/25/give-apache-break-nginx/">using a single-threaded server like nginx or lighttpd</a> or even a memory server like varnish (bonus points for using a CDN to serve static files, avoiding the hit to your server at all).</p>
<p><strong>Turn off HostnameLookups</strong><br />
This should already be done by default in your Apache configuration; if it isn&#8217;t, do it now. When <em>HostnameLookups</em> is on, Apache checks every incoming request&#8217;s IP address for its host name. This can dramatically increase your latency, and isn&#8217;t healthy for DNS servers either.</p>
<p><strong>Disable AllowOverride</strong><br />
It is tempting to set <em>AllowOverride</em> to All in order to give your .htaccess files free reign to do as they please. The downside of this directive is that every time anything is requested Apache will need to check that folder and every one of its parents all the way down to the site root in order to check for .htaccess commands. Apache recommends setting <em>AlloverOverride</em> to <strong>none</strong> globally, enabling access for .htaccess files that can&#8217;t be set in the site configuration.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/12/20/fastcgi-nginx-performance-vm/' rel='bookmark' title='Using FastCGI with Nginx for Performance on a VM'>Using FastCGI with Nginx for Performance on a VM</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/12/performance-tuning-apache/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How Play Framework Saves the World</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/11/play-framework-saves-world/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/11/play-framework-saves-world/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 12:46:05 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Play Framework]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[play framework]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=367</guid>
		<description><![CDATA[Play framework must be the best-kept secret in the Java world. If you haven&#8217;t had a chance to see their totally awesome demonstration video where they build a full app before your eyes in a matter of minutes, go &#8211; go now. Then come back. Why do I like this framework so much? Put simply, [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/05/09/accessing-configuration-parameters-play-frameworks-template-engine/' rel='bookmark' title='Accessing Configuration Parameters using Play Framework&#8217;s Template Engine'>Accessing Configuration Parameters using Play Framework&#8217;s Template Engine</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/22/rely-continuous-integration/' rel='bookmark' title='Rely on Continuous Integration'>Rely on Continuous Integration</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Play framework must be the best-kept secret in the Java world. If you haven&#8217;t had a chance to see their totally awesome demonstration video where they build a full app before your eyes in a matter of minutes, <a href="http://www.playframework.org/">go &#8211; go now</a>. Then come back.</p>
<p>Why do I like this framework so much? Put simply, it is an elegant solution for nearly every problem I&#8217;ve ever run into in developing websites, both single-server and multi-server applications. Don&#8217;t take my word for it, see for yourself.</p>
<p><strong>The Goodness of Java</strong><br />
To my mind, Java has the edge over more common scripting languages (like PHP) because it is compiled (fast) and statically typed (reliable). In the past, using compiled languages on the web was only possible if you were using ASP.NET or willing to put up with the hassles of existing Java frameworks and servers.</p>
<p>Play&#8217;s first innovation comes from wrapping the Java runtime inside a Python web server; using a Play application is as easy as running a command line script and connecting with your web browser. Play&#8217;s second innovation is its just-in-time compilation and display of error messages; if you make a mistake you will know in the amount of time it takes to hit refresh on your web browser.</p>
<p>Since it IS java, programmers can use libraries they have built for other applications or sourced from other vendors and plug directly into their code. This is one of the advantages Microsoft has had going for it and it is good to see it implemented so nicely in the open source world.</p>
<p><strong>The Ease of Rails</strong><br />
Love it or hate it, Ruby on Rails has had an affect on the entire web world and its reach is definitely felt in the Play framework. Everything from the routing to JPA integration has that minimal-configuration design that is so prevalent in the Ruby world. Play has the edge though, due to Java annotations and the extra control you get as a developer.</p>
<p><strong>Baked-in Unit Testing</strong><br />
Admittedly this is the first thing that drew me to the Play framework. Unit testing has to be one of the most important aspects of good programming; in fact, if your code is <em>not</em> covered by unit tests, I argue it is incomplete. Play has terrific support for unit testing, functional testing and selenium-based web testing. In version 1.1, Play added a headless web testing mode, paving the way to run framework applications in the context of an automated build environment &#8211; smart move!</p>
<p>Although awkward at first, using YAML files for database fixtures makes a lot of sense. Managing database access in unit tests has always been a challenge but thanks to the in-memory database server and fixture files Play offers us database <em>integration testing</em> &#8211; giving us the fresh-start benefits of mock frameworks along with the soundness of mind that comes from knowing you are testing the real database.</p>
<p><strong>Share Nothing Architecture</strong><br />
Call it laziness, call it human error. At some point in the development cycle, the session always seems to end up carrying user data around. Even with data-sharing applications like memcached, that style of development does not scale well. With Play, sessions are stored in user cookies and consist of an encrypted key. The idea is the application takes care of loading any additional information it needs from this seed information, so the web cluster can be expanded to hundreds of nodes or reduced to a single server with no performance penalties on the other servers. Each Play instance operates as if it is the only one in existence, making it far easier to support complex site architectures.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/05/09/accessing-configuration-parameters-play-frameworks-template-engine/' rel='bookmark' title='Accessing Configuration Parameters using Play Framework&#8217;s Template Engine'>Accessing Configuration Parameters using Play Framework&#8217;s Template Engine</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/22/rely-continuous-integration/' rel='bookmark' title='Rely on Continuous Integration'>Rely on Continuous Integration</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/11/play-framework-saves-world/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cloud Computing Is Not Magical</title>
		<link>http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 01:59:53 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[customer service]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=237</guid>
		<description><![CDATA[Back in 2009 I was tired of hearing the phrases &#8220;cloud computing&#8221; and &#8220;in the cloud&#8221;. These days I&#8217;m so numb to their meaninglessness that it doesn&#8217;t even phase me anymore. Somewhere along the way marketers took over the internet and &#8216;social media&#8217; became a job position. So what do I have against cloud computing? [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/' rel='bookmark' title='Surviving Cloud Failures'>Surviving Cloud Failures</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/' rel='bookmark' title='Drizzle &#8211; MySQL for the Cloud'>Drizzle &#8211; MySQL for the Cloud</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/' rel='bookmark' title='Small Site, Big Footprint'>Small Site, Big Footprint</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Back in 2009 I was tired of hearing the phrases &#8220;cloud computing&#8221; and &#8220;in the cloud&#8221;. These days I&#8217;m so numb to their meaninglessness that it doesn&#8217;t even phase me anymore. Somewhere along the way marketers took over the internet and &#8216;social media&#8217; became a job position.</p>
<p>So what do I have against cloud computing? Would I rather build servers, deal with co-location, and suffer massive downtimes in order to change hardware specs? Of course not.</p>
<p>Let&#8217;s not lose sight of the big picture: virtualized servers are still servers. From a remote perspective the management is all the same and from a hardware perspective you still need to be responsible for your data in the event of a catastrophic failure.</p>
<p>While I am a huge proponent of &#8220;cloud&#8221; providers like Rackspace (heck I host all of my web sites on Cloud Server instances), let&#8217;s call a spade a spade: there is nothing magical about servers in the cloud, they are just virtualized instances running on a massively powerful hardware architecture.</p>
<p>Why go with virtualization over a dedicated box? Virtual servers are <em>cheap</em> &#8211; I don&#8217;t need to incur the startup costs that I would from a dedicated server. For a small business this is a huge deal; for larger business with intense data needs the dedicated solution will always provide the most security but for anything from tiny, small to very large applications the virtualized way is the ticket. Add more servers, remove them, reconfigure: you don&#8217;t get that kind of flexibility from traditional server hosting.</p>
<p>Long live cloud computing; but the name has to go. Did the term come from network diagrams where the Internet was represented as a cloud? I don&#8217;t think it&#8217;s a particularly clever analogy to consider your business assets living as disembodied entities &#8220;somewhere&#8221; in the networking cloud.</p>
<p>We&#8217;re fighting a losing battle if we believe we&#8217;re going to get the marketers to back off the internet now. But on the tech side let&#8217;s keep calling it what it is and try not to let the marketing buzz cloud our opinion of the technologies we use.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/23/surviving-cloud-failures/' rel='bookmark' title='Surviving Cloud Failures'>Surviving Cloud Failures</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/03/24/drizzle-mysql-cloud/' rel='bookmark' title='Drizzle &#8211; MySQL for the Cloud'>Drizzle &#8211; MySQL for the Cloud</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/16/small-site-big-footprint/' rel='bookmark' title='Small Site, Big Footprint'>Small Site, Big Footprint</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2011/04/05/cloud-computing-magical/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Give Apache a Break with nginx</title>
		<link>http://www.alwaysgetbetter.com/blog/2010/09/25/give-apache-break-nginx/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2010/09/25/give-apache-break-nginx/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 20:21:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[apache nginx linux]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=331</guid>
		<description><![CDATA[One of the things I&#8217;ve learned about Apache is that as good as it is, it suffers from its monolithic &#8220;do-everything&#8221; nature. The modules and tuning required for effective operation just doesn&#8217;t fit into a lean, quick package. That said, I find it beats out the alternatives hands-down when it comes to running web applications [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/12/performance-tuning-apache/' rel='bookmark' title='Performance Tuning Apache'>Performance Tuning Apache</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/12/20/fastcgi-nginx-performance-vm/' rel='bookmark' title='Using FastCGI with Nginx for Performance on a VM'>Using FastCGI with Nginx for Performance on a VM</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One of the things I&#8217;ve learned about Apache is that as good as it is, it suffers from its monolithic &#8220;do-everything&#8221; nature. The modules and tuning required for effective operation just doesn&#8217;t fit into a lean, quick package. That said, I find it beats out the alternatives hands-down when it comes to running web applications of any complexity.</p>
<p>One very simple and effective method for improving Apache&#8217;s performance involves off-loading static content to another server. Since Apache spawns a new process (and the memory allocation that goes with that) for every request, it is pretty wasteful to serve your images, css, javascript and similar files this way.</p>
<p>For larger applications, we could run a second web server that makes use of a single-threaded polling process like lighttpd, or use a content delivery network to move our content physically closer to our users for even more speed.</p>
<p>For smaller applications and organizations, we can use nginx as a proxy to serve static content to our visitors. This can be a separate physical web server, or it can be a service running on the same server as Apache. I use the same-server proxy approach at alwaysgetbetter.com, and it has made a significant difference in my server load and memory usage.</p>
<p>To start, change Apache&#8217;s settings so it listens on a separate port (rather than the default port 80).</p>
<p>Next, set up nginx to listen on the default http port 80. We will let Nginx decide whether each request should be served directly from the hard drive, or whether it should pass through to Apache.</p>
<p>The config file for nginx looks like this:<br />
<code><br />
server {<br />
listen 80;<br />
server_name mysite.com www.mysite.com;<br />
access_log /var/log/nginx/website-access.log;<br />
error_log /var/log/nginx/website-error.log;<br />
# serve static files<br />
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|pdf|ppt|txt|tar|wav|bmp|rtf|js|mp3|avi|mov)$ {<br />
root /var/www/html;<br />
expires 30d;<br />
}</p>
<p># pass requests for dynamic content to site<br />
location / {<br />
proxy_pass http://127.0.0.1:8080;<br />
proxy_redirect off;<br />
proxy_set_header Host $host;<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
client_max_body_size 128m;<br />
client_body_buffer_size 256k;<br />
proxy_connect_timeout 60;<br />
proxy_send_timeout 60;<br />
proxy_read_timeout 60;<br />
proxy_buffer_size 4k;<br />
proxy_buffers 32 256k;<br />
proxy_busy_buffers_size 512k;<br />
proxy_temp_file_write_size 512k;<br />
}<br />
}<br />
</code></p>
<p>It is also possible to serve PHP and other dynamic content using nginx, but for our purposes it makes a lot more sense to use Apache for scripting and nginx as the web-facing proxy.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/12/performance-tuning-apache/' rel='bookmark' title='Performance Tuning Apache'>Performance Tuning Apache</a></li>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/12/20/fastcgi-nginx-performance-vm/' rel='bookmark' title='Using FastCGI with Nginx for Performance on a VM'>Using FastCGI with Nginx for Performance on a VM</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2010/09/25/give-apache-break-nginx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tethering the Internet, Week One</title>
		<link>http://www.alwaysgetbetter.com/blog/2010/05/29/tethering-internet-week/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2010/05/29/tethering-internet-week/#comments</comments>
		<pubDate>Sat, 29 May 2010 19:31:32 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[broadband]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=313</guid>
		<description><![CDATA[So I&#8217;ve been tethering my phone and using it as a backup Internet connection for just over a week now and so far I have been pretty happy with the results. Using Xplornet as my primary source and my cell phone tethered into my computer via USB, I&#8217;m actually able to get fairly reliable service [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been tethering my phone and using it as a backup Internet connection for just over a week now and so far I have been pretty happy with the results.</p>
<p>Using Xplornet as my primary source and my cell phone tethered into my computer via USB, I&#8217;m actually able to get fairly reliable service &#8211; the computer switches back and forth between whichever connection happens to have access to the Internet.</p>
<p>This could work&#8230;</p>
<p>I see that Bell is now offering a 2Mbps modem for rural residents. I&#8217;d like to try that as an alternative to Xplornet &#8211; maybe I&#8217;ll be able to drop my contract in March and have reliable net.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2010/05/29/tethering-internet-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Cell Phone as Backup Internet</title>
		<link>http://www.alwaysgetbetter.com/blog/2010/05/24/cell-phone-backup-internet/</link>
		<comments>http://www.alwaysgetbetter.com/blog/2010/05/24/cell-phone-backup-internet/#comments</comments>
		<pubDate>Mon, 24 May 2010 14:48:33 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[broadband]]></category>
		<category><![CDATA[connectivity]]></category>
		<category><![CDATA[customer service]]></category>
		<category><![CDATA[Palm Pre]]></category>

		<guid isPermaLink="false">http://www.alwaysgetbetter.com/blog/?p=311</guid>
		<description><![CDATA[Since we live in the country and rely on line-of-sight Internet for our connectivity, I&#8217;ve been increasingly frustrated with service quality and uptime programs. There are a lot of reasons I want to move to a denser population area but access to a proper Internet connection is high on my list. photo credit: abulhussain My [...]
Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/15/backup-time/' rel='bookmark' title='Backup Through Time'>Backup Through Time</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Since we live in the country and rely on <a href="http://www.alwaysgetbetter.com/blog/2008/12/03/ontario-government-builds-rural-internet-infrastructure/">line-of-sight Internet</a> for our connectivity, I&#8217;ve been increasingly frustrated with service quality and uptime programs. There are a lot of reasons I want to move to a denser population area but access to a proper Internet connection is high on my list.</p>
<div class="alignright"><a title="Palm Pre front1" href="http://www.flickr.com/photos/7678586@N06/4505473681/" target="_blank"><img src="http://farm5.static.flickr.com/4056/4505473681_27527ee8a0_m.jpg" border="0" alt="Palm Pre front1" /></a><br />
<small><a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://www.alwaysgetbetter.com/blog/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="abulhussain" href="http://www.flickr.com/photos/7678586@N06/4505473681/" target="_blank">abulhussain</a></small></div>
<p> My phone has turned out to be a decent alternative; using <a href="http://palmpre-hacks.com/palm-pre-hacks/how-to-hacktether-palm-pre-into-a-wifi-router/">instructions I found online</a> I was able to re-purpose my Palm Pre as a WiFi router. It&#8217;s still not broadband but it gives me a way to check my email when my <del datetime="2010-05-24T14:15:44+00:00">Xplornet</del> fixed wireless (often) fails.</p>
<p>Although Bell Canada supports tethering with their smartphone plans, they don&#8217;t go out of their way to make it obvious how to do it. <a href="http://mytether.net/">My Tether</a> turned out to be worth the cost; even though there is a free version you can use if you want to play with the settings.</p>
<p>Related posts:<ol>
<li><a href='http://www.alwaysgetbetter.com/blog/2011/04/15/backup-time/' rel='bookmark' title='Backup Through Time'>Backup Through Time</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.alwaysgetbetter.com/blog/2010/05/24/cell-phone-backup-internet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: alwaysgetbetter.com @ 2012-02-05 03:38:55 -->
