<?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: AppEngine and Resource Performance: Why you need a CDN</title>
	<atom:link href="http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/feed/" rel="self" type="application/rss+xml" />
	<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/</link>
	<description>embracing distractions of the digital age</description>
	<lastBuildDate>Tue, 07 Sep 2010 14:02:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Damon</title>
		<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/comment-page-1/#comment-1301</link>
		<dc:creator>Damon</dc:creator>
		<pubDate>Tue, 01 Jun 2010 10:40:28 +0000</pubDate>
		<guid isPermaLink="false">http://distractable.net/?p=897#comment-1301</guid>
		<description>Thanks for the feedback Gary - glad the site loads up nice and quick (admittedly it&#039;s not doing anything too fancy at the moment).  Actually since writing this post, it&#039;s possible CloudFront has gotten a little bit faster again for us here in Australia with the Singapore / Hong Kong edge locations coming online.  Difference is probably minimal from the Japan edge nodes we would have been served from previously, but every little bit helps.</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback Gary &#8211; glad the site loads up nice and quick (admittedly it&#8217;s not doing anything too fancy at the moment).  Actually since writing this post, it&#8217;s possible CloudFront has gotten a little bit faster again for us here in Australia with the Singapore / Hong Kong edge locations coming online.  Difference is probably minimal from the Japan edge nodes we would have been served from previously, but every little bit helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/comment-page-1/#comment-1299</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Tue, 01 Jun 2010 10:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://distractable.net/?p=897#comment-1299</guid>
		<description>Thanks for the info Damon. I&#039;m doing a bit of work in trying to get my sites quicker and am investigating the CloudFront route.
By the way, from a Sydney users perspective, http://www.sidelab.com loads incredibly quickly.</description>
		<content:encoded><![CDATA[<p>Thanks for the info Damon. I&#8217;m doing a bit of work in trying to get my sites quicker and am investigating the CloudFront route.<br />
By the way, from a Sydney users perspective, <a href="http://www.sidelab.com" rel="nofollow">http://www.sidelab.com</a> loads incredibly quickly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shubh-Regular Blog Tips</title>
		<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/comment-page-1/#comment-535</link>
		<dc:creator>Shubh-Regular Blog Tips</dc:creator>
		<pubDate>Mon, 05 Apr 2010 15:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://distractable.net/?p=897#comment-535</guid>
		<description>At first, the test showed about 1.2 sec with pingdom ftp
but then it drastically reduced to 950ms and then to 450ms. And my image is a lot bigger than yours. Its 244.3kb. I use appspot. something is better than nothing.</description>
		<content:encoded><![CDATA[<p>At first, the test showed about 1.2 sec with pingdom ftp<br />
but then it drastically reduced to 950ms and then to 450ms. And my image is a lot bigger than yours. Its 244.3kb. I use appspot. something is better than nothing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damon</title>
		<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/comment-page-1/#comment-135</link>
		<dc:creator>Damon</dc:creator>
		<pubDate>Wed, 03 Mar 2010 12:54:07 +0000</pubDate>
		<guid isPermaLink="false">http://distractable.net/?p=897#comment-135</guid>
		<description>Thanks for the deploy script Mike - very slick as per the app.yaml tricks to serve that cache busting (like the term) CSS and JS.

I had written some &lt;a href=&quot;http://groovy.codehaus.org/&quot; rel=&quot;nofollow&quot;&gt;groovy code&lt;/a&gt; for doing similar concatenation of javascript files in a project I was working on that was very javascript heavy.  I&#039;ve posted the groovy snippet as a &lt;a href=&quot;http://gist.github.com/296463&quot; rel=&quot;nofollow&quot;&gt;github gist&lt;/a&gt;, but it&#039;s definitely a bit raw still.  I might try and clean it up and integrate it with the YUI compressor and then write a quick post on how I intend to use it.

Cheers,
Damon.</description>
		<content:encoded><![CDATA[<p>Thanks for the deploy script Mike &#8211; very slick as per the app.yaml tricks to serve that cache busting (like the term) CSS and JS.</p>
<p>I had written some <a href="http://groovy.codehaus.org/" rel="nofollow">groovy code</a> for doing similar concatenation of javascript files in a project I was working on that was very javascript heavy.  I&#8217;ve posted the groovy snippet as a <a href="http://gist.github.com/296463" rel="nofollow">github gist</a>, but it&#8217;s definitely a bit raw still.  I might try and clean it up and integrate it with the YUI compressor and then write a quick post on how I intend to use it.</p>
<p>Cheers,<br />
Damon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike K.</title>
		<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/comment-page-1/#comment-134</link>
		<dc:creator>Mike K.</dc:creator>
		<pubDate>Wed, 03 Mar 2010 12:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://distractable.net/?p=897#comment-134</guid>
		<description>Actually, that app.yaml line looks more complicated than it needs to be. I think it could just be:


- url: /css/prod/.*
  static_files: static/css/prod.css
  upload: static/css/prod.css</description>
		<content:encoded><![CDATA[<p>Actually, that app.yaml line looks more complicated than it needs to be. I think it could just be:</p>
<p>- url: /css/prod/.*<br />
  static_files: static/css/prod.css<br />
  upload: static/css/prod.css</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike K.</title>
		<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/comment-page-1/#comment-133</link>
		<dc:creator>Mike K.</dc:creator>
		<pubDate>Wed, 03 Mar 2010 12:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://distractable.net/?p=897#comment-133</guid>
		<description>Ah, right - I missed that part! :) 

An example deploy script is below. Actually, the IDs are just fake. If you change the ID part of the URL to a new ID, it will still work! And, yes, it is purely for cache busting purposes.

The dynamic ID is achieved by serving the CSS etc like so in the app.yaml file:

- url: /css/prod/([^-]+)-.*
  static_files: static/css/\1.css
  upload: static/css/(.*)


Okay, here is the deploy script (there is a separate tests script that will exit if the tests don&#039;t pass).

== AppEngine deploy script ==

#!/bin/sh

export APPLICATION_ID=&quot;my_app_id&quot;

cd $MY_APP_DIR

# The tests all must run successfully.
./tests.sh

echo &quot;** PUBLIC CSS...\n&quot;
cat static/css/base.css \
    static/css/file1.css \
    static/css/file2.css \
    static/css/etc.css &gt; /tmp/precompile.css.tmp;
java -jar /usr/bin/yuicompressor-2.4.2.jar \
     --type css /tmp/precompile.css.tmp \
     -o static/css/prod.css
echo &quot;\tCSS has been compiled (static/css/prod.css)\n&quot;

echo &quot;** PUBLIC JS...\n&quot;
cat static/js/mootools-1.2.3-core.js \
    static/js/base.js \
    static/js/file1.js \
    static/js/file2.js \
    static/js/etc.js &gt; /tmp/precompile.js.tmp
java -jar /usr/bin/yuicompressor-2.4.2.jar \
     --type js /tmp/precompile.js.tmp \
     -o static/js/prod.js
echo &quot;\tJS has been compiled (static/js/prod.js)\n&quot;

echo &quot;** DEPLOYING...\n&quot;
appcfg.py update $MY_APP_DIR

echo &quot;** DONE!\n&quot;
echo &quot;** CLEANUP...&quot;

rm /tmp/precompile.css.tmp
rm /tmp/precompile.js.tmp
rm $MY_APP_DIR/static/css/prod.css
rm $MY_APP_DIR/static/js/prod.js</description>
		<content:encoded><![CDATA[<p>Ah, right &#8211; I missed that part! <img src='http://distractable.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>An example deploy script is below. Actually, the IDs are just fake. If you change the ID part of the URL to a new ID, it will still work! And, yes, it is purely for cache busting purposes.</p>
<p>The dynamic ID is achieved by serving the CSS etc like so in the app.yaml file:</p>
<p>- url: /css/prod/([^-]+)-.*<br />
  static_files: static/css/\1.css<br />
  upload: static/css/(.*)</p>
<p>Okay, here is the deploy script (there is a separate tests script that will exit if the tests don&#8217;t pass).</p>
<p>== AppEngine deploy script ==</p>
<p>#!/bin/sh</p>
<p>export APPLICATION_ID=&#8221;my_app_id&#8221;</p>
<p>cd $MY_APP_DIR</p>
<p># The tests all must run successfully.<br />
./tests.sh</p>
<p>echo &#8220;** PUBLIC CSS&#8230;\n&#8221;<br />
cat static/css/base.css \<br />
    static/css/file1.css \<br />
    static/css/file2.css \<br />
    static/css/etc.css &gt; /tmp/precompile.css.tmp;<br />
java -jar /usr/bin/yuicompressor-2.4.2.jar \<br />
     &#8211;type css /tmp/precompile.css.tmp \<br />
     -o static/css/prod.css<br />
echo &#8220;\tCSS has been compiled (static/css/prod.css)\n&#8221;</p>
<p>echo &#8220;** PUBLIC JS&#8230;\n&#8221;<br />
cat static/js/mootools-1.2.3-core.js \<br />
    static/js/base.js \<br />
    static/js/file1.js \<br />
    static/js/file2.js \<br />
    static/js/etc.js &gt; /tmp/precompile.js.tmp<br />
java -jar /usr/bin/yuicompressor-2.4.2.jar \<br />
     &#8211;type js /tmp/precompile.js.tmp \<br />
     -o static/js/prod.js<br />
echo &#8220;\tJS has been compiled (static/js/prod.js)\n&#8221;</p>
<p>echo &#8220;** DEPLOYING&#8230;\n&#8221;<br />
appcfg.py update $MY_APP_DIR</p>
<p>echo &#8220;** DONE!\n&#8221;<br />
echo &#8220;** CLEANUP&#8230;&#8221;</p>
<p>rm /tmp/precompile.css.tmp<br />
rm /tmp/precompile.js.tmp<br />
rm $MY_APP_DIR/static/css/prod.css<br />
rm $MY_APP_DIR/static/js/prod.js</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damon</title>
		<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/comment-page-1/#comment-132</link>
		<dc:creator>Damon</dc:creator>
		<pubDate>Wed, 03 Mar 2010 12:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://distractable.net/?p=897#comment-132</guid>
		<description>Hey Mike,

Yep was getting around to the CSS + JS compression (I mention it but admittedly it&#039;s right at the end of the post).  In reality, I knew I was doing this a bit back to front but I&#039;m the kind of guy that will read the last page in a book so I know where I&#039;m going (well, not really, but that&#039;s about the best analogy I had).

If you get the time would be really interested in hearing more about your deploy script, as I notice it appends a build ID or something to both the CSS and JS resources as part of the deployment, which I&#039;m guessing prevents later pain with cached versions of those files.

Thanks for the response, and hope business continues to grow for you guys over @ Shoes of Prey.

Cheers,
Damon.</description>
		<content:encoded><![CDATA[<p>Hey Mike,</p>
<p>Yep was getting around to the CSS + JS compression (I mention it but admittedly it&#8217;s right at the end of the post).  In reality, I knew I was doing this a bit back to front but I&#8217;m the kind of guy that will read the last page in a book so I know where I&#8217;m going (well, not really, but that&#8217;s about the best analogy I had).</p>
<p>If you get the time would be really interested in hearing more about your deploy script, as I notice it appends a build ID or something to both the CSS and JS resources as part of the deployment, which I&#8217;m guessing prevents later pain with cached versions of those files.</p>
<p>Thanks for the response, and hope business continues to grow for you guys over @ Shoes of Prey.</p>
<p>Cheers,<br />
Damon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike K.</title>
		<link>http://distractable.net/tech/appengine-resource-performance-why-you-need-cdn/comment-page-1/#comment-131</link>
		<dc:creator>Mike K.</dc:creator>
		<pubDate>Wed, 03 Mar 2010 12:08:17 +0000</pubDate>
		<guid isPermaLink="false">http://distractable.net/?p=897#comment-131</guid>
		<description>Hi Damon

Nice post. I have to say I don&#039;t have a lot of experience with CDNs - however, if I can make a really simple suggestion to improve page load speed, it would be to use a JavaScript/CSS compressor to concatenate all of your files into a single master JavaScript or CSS file. 

That way you&#039;re only serving 2 HTTP requests - 1 for CSS and 1 for JavaScript - instead of something like the 8 or 9 you&#039;re currently doing. 

We use YUI Compressor on Shoes of Prey - and we&#039;ve built it into our deploy script so it all happens magically when we&#039;re launching a new version. On a dev machine we serve out all of the individual files to make it easier to debug.

I also set my default cache expiration in AppEngine to 5 days for static files. This may actually be the default, I can&#039;t remember....

Hope that helps!

Mike :)</description>
		<content:encoded><![CDATA[<p>Hi Damon</p>
<p>Nice post. I have to say I don&#8217;t have a lot of experience with CDNs &#8211; however, if I can make a really simple suggestion to improve page load speed, it would be to use a JavaScript/CSS compressor to concatenate all of your files into a single master JavaScript or CSS file. </p>
<p>That way you&#8217;re only serving 2 HTTP requests &#8211; 1 for CSS and 1 for JavaScript &#8211; instead of something like the 8 or 9 you&#8217;re currently doing. </p>
<p>We use YUI Compressor on Shoes of Prey &#8211; and we&#8217;ve built it into our deploy script so it all happens magically when we&#8217;re launching a new version. On a dev machine we serve out all of the individual files to make it easier to debug.</p>
<p>I also set my default cache expiration in AppEngine to 5 days for static files. This may actually be the default, I can&#8217;t remember&#8230;.</p>
<p>Hope that helps!</p>
<p>Mike <img src='http://distractable.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
