Using Google as a FREE origin pull CDN

There are bucket load of posts on how to use google application engine (GAE) as a CDN but many of them direct you to hosting static content on a google server. For me that approach isn’t practical, every time I did a WordPress update or plugin upgrade I would have to push an update to GAE… annoying!

Origin-Pull is the future then, basically the server acting as a CDN pulls a copy of the original, caches it and serves that to clients. Updates on the main site are easy, just wait for the CDN to age out it’s cache or if you are impatient manually purge.

Over the weekend I stumpbled upon SymPullCDN a GAE app, it’s a bit out of date so I’ve pushed a newer version to github. I’ve made two changes, firstly updated to python2.7 (as per google’s recommendation) and secondly I’ve added a cron job to keep your GAE app snappy :)

Setting up your own copy is simple, start by signing up for GAE and create a new “application”, mine’s called mygaecdn

create_gae

Next get a copy of the Google App Engine SDK for Python also known as GoogleAppEngineLauncher… Install it :)

Once it’s running, create a new application… give it the same name as the app you created on google.

new_gae_app

Take a note of the directory in which the application is being created, mine is Users/nick/Documents/GoogleAppEngine/mygaecdn

Next download this zip file which has the updated SymPullCDN files.

Delete everything from your Users/nick/Documents/GoogleAppEngine/mygaecdn and place in there the contents of SymPullCDN-master.zip

Open app.yaml in a text-editor and edit line 1 to replace *replace*me* with your application name, e.g.:

application: mygaecdn

Next open main.py in a text-editor and edit line 21 and replace http://replace*me/ with your website, e.g.:

origin = "http://www.linickx.com/" 

Make sure you save both files and you are done!

Now, test locally in the GoogleAppEngineLauncher app before deploying to google. Click the green “play” and a GAE application will run on your local machine; from the screenshot above you can see mine is listening on “port 10080″, so I can open a web browser to http://localhost:10080 – all things being equal you will see a copy of your website :)

If that works you’re ready to deploy…. hit the blue “deploy” button to push you app up to google. When that’s finished you should be able to visit mygaecdn.appspot.com… obviously yours isn’t called mygaecdn!

Once the deploy is finished you have a GAE ready and willing to serve cached copies of your site.

What you do next will depend on your website. Me, I use WordPress and wp-super-cache, so I can simply enable the CDN feature in that, e.g.:

wp_wp-s-c_cdn

You might have to install something, or change some URLs, whatever you do, just remember to only change links to static content such as CSS, JS or IMG – anything dynamic is likely to end in a world of pain.

FOOTNOTE: The term CDN is used loosely in this blog post, GAE is more of a content off-load, IMHO a CDN should server you geographically-local content but in all my tests on webpagetest showed all my content coming from Google-USA, not that is really a problem as their servers are still rocket-quick :cool:

Disappointed by google drive

I’m a (very happy) google apps user and when google drive was announced a while back I was looking forward to giving it a spin.

Well I have taken 5min’s out of my life to test out the google’s doc’s on my desktop app only to be quite disappointed; what google have done is taken the worst part of the market leader’s (dropbox) cloud storage app, married it to the worst part of google docs and pushed it out!

Continue reading

OS X: Change google Chrome to Search .co.uk instead of .com


I’ve just gotten around to solving this little niggle; having google search google.com by default instead of google.co.uk was one of those little annoyances that I was just living with.

Today I found a solution on Chrome Bug 1521 on Comment 39

- Quit Chrome
- Open ~/Library/Application Support/Google/Chrome/Local State in your favorite text editor.
- Search for the strings ‘last_known_google_url’ and ‘last_prompted_google_url’ adn replace their values to your preferred Google base URL (e.g. www.google.com)
- Save and start chrome back up.

Yep, that works!

QR Code – linickx.com

QR Code to Linickx.com

Yep, that QR code should point you back to linickx.com… that’s my first play with the google charts API… humm, what next??

LINICKX is now a word!

Whilst trying to find something of mine via google I’ve noticed something new. LINICKX has now been accepted by google as a word, not back considering I made it up!

In the past if you googled for linickx – www.google.com/search?q=linickx – google would suggest “Did you mean links?“, but today I’ve noticed that is gone!

So it appears that my continued internet activity has made an impact on the wold wide web, Very cool!

Have Firefox & Google Toolbar Merged ?

Firefox Spell Checker

So firefox 2 was released yesterday , and I’ve just been browsing through the features list. The fact that some of the google toolbar features have sneaked in as default functionality doesn’t surprise me, for example the google spellcheckerspell checker from the google plugin is an obvious feature for mozilla to include in the core.

What surprised me was how the anti phishing feature was just lifted:

google anti-phisinig Mozilla anti-phising
Google Anti-Phising Mozilla Anti-Phising

This is an excellent example of open source, and it’s really good to see google sharing their work , I just hope that anti customize google doesn’t sneak in or worse still targeted adversting !

Gmail File Space Extension (gSpace)

For those who can’t wait for the fabled gdrive, this is worth a look, you get like an FTP style interface to gmail within firefox, I’ve found it useful for quick backups.

Gmail File Space
his extension allows you to use your Gmail Space (2 GB) for file storage. It acts as a remote machine. You can transfer files between your hard drive and gmail. This is similar to “Gmail Drive” on windows platform. Your gmail account looks like a FTP host and you can upload and download your files. After you install, you get an option called “GSpace” in your “tools” menu clicking on which opens the window for transfer of folders/files. Works great for photos and music files less than 14MB.

Google Browser Sync

Google Browser Sync
Google Browser Sync for Firefox is an extension that continuously synchronizes your browser settings including bookmarks, history, persistent cookies, and saved passwords across your computers.

I’ve been needing something like this for ages ! At the moment I have to use my USB key to transfer saved password etc from my work laptop to my home pc, but the issue of security is still a big one. I don’t save my on-line bank password anywhere so that’ll be alright, but I do save various e-mail account passwords, the issue being that a google employee could hi-jack one of my accounts, ok you have to enter a PIN to encrypt the passwords, but I can’t find anything that tells me how strong the encryption is! Humm I think a risk assessment is in order ;-)

Google Sharing with Reader !

I’ve just noticed today, that google have added a new sharing feature to google reader.

The results are quite cool, they offer the standard ‘share my feeds’ feature that other places offer, but what I like is being able to share ‘star‘ items. I subscribe to a lot of feeds (too many to read if I’m honest), but sometimes it’s handy to star them so I can come back to them. Now my interesting items will be visible to the world ! :cool:

Check out http://www.linickx.com/blog/google-reader/

Short Google Links

I link to google all the time (e-mails, web pages etc), one of the annoying things is that the URL is getting longer and longer…

This is what I mean: Your friends looking for foobar, you know there’s loads on google, so you search for foorbar, you then forward the link which looks like this….
http://www.google.co.uk/search?sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2005-09,GGGL:en&q=foobar
nice… NOT ! (Look, it doesn’t even fit on the page properly !)
So here’s the same thing but shorter…
http://www.google.co.uk/search?q=foobar
aah much nicer ;)

I guess this post is mainly for me to remember, but hopefully it’ll brighten up someone else’s day to ! :cool:

Blogger Web Comments for Firefox

I’ve been putting off upgrading to firefox 1.5 for ages, but my curiosity for this extension finally got the better of me ! :D

Blogger Web Comments for Firefox
Blogger Web Comments for Firefox is an extension that makes it easy to see what bloggers are saying about a page you’re viewing in firefox

I know this isn’t exactly new news , so there are lots of places to find out about it ! I’ve been playing with it a little today, and still am undecided on whether it’s cool or annoying.

Coolness: Visiting sites, and seeing what people say about them gives a good insight into the sites audience, and being able to leave comments on a site that doesn’t support them is also kind-a-cool… where it fall down is there is no default “this post is about this page” on your blogspot blog, so you have to remember to put one in yourself :(

Annoying: It’s another “pop up”, and people are posting comments about google.com or mail.yahoo.com and I’m thinking, why ? what do I care ? and how is this relevant, there is no intelligent comment that can be made about mail.yahoo’s log in page ! I can think of two improvements I’m going to suggest

  1. Filterable: Be able to disable comments for certain sites
  2. A side bar: pop ups are distracting, but a side bar (maybe with auto hide) would be less annoying (may be a little more intrusive) and would allow multiple comments to be seen at any one time !

You can check out what I’ve said about websites on my blogger account. I’ve not used it for anything else much, so It’ll be interesting to see if I use it now !