wiredfool

Archive for August, 2008

Google Gears as Your Own Private CDN

One of the things with webapps now is that they load a ton of extra stuff, javascript, css, images, static pages. Lots of extra stuff. The work site has something like 15 includes of one variety or another on each page, and a bunch more that are loaded as needed on one or two pages. That’s a lot of latency.

One way to fix it is caching and expires headers, another is to minify and compress the javascript and css, and another way is to just get the files near the user so that they can load all the items without round trips to the server. Big sites do this with a CDN, a content distribution network. But two drawbacks of that approach are that they’re not from the same site for origin purposes, and you generally have to pay for a CDN, and that’s out of the reach of smaller sites. On the other hand, they do it without you noticing, and gears does require confirmation and trust.

Google Gears has a local server and cache space that are intended for use in taking applications offline for later syncing with the cloud. But it’s just as useful for serving bits in conjunction with the online version. The important thing is that everytime there’s a request for one of the files in the cache, gears will serve it locally. That’s a lot less latency.

Best of all, it’s pretty easy to setup. You include the gears_init.js file, create a local server and assign it a manifest. The manifest controls everything that gears will download once and cache, until the version number in the manifest changes.

The javascript changes, cribbed from wordpress’s version of this and the google docs.

<script type='text/javascript' src='gears_init.js'></script>".
<script type='text/javascript'>
       if ( 'undefined' != typeof google && google.gears ) {
             var localServer = google.gears.factory.create('beta.localserver');
              var store = localServer.createManagedStore('cdn-store');
              store.manifestUrl = 'gears-manifest.txt';
              store.checkForUpdate();
       }
</script>

And the manifest file:

// site-manifest.txt
{
  "betaManifestVersion": 1,
  "version": "1",
  "entries": [
    { "url": "gears_init.js" }
	{ "url": "common/prototype.js" },	
	{ "url": "common/scriptaculous.js?load=effects" },	
	{ "url": "common/effects.js" },	
	{ "url": "and so on and so on...." }
  ]
}

I’m not sure that this is a total game changer for the general web, but for sites that are apps where the users both trust the site and spend a significant amount of time there, it’s a win. This is already being used for the admin interface of WordPress 2.6. I can see it being used in a lot of places with rich interfaces where the users are highly invested in the site and latency is a concern.

No comments

Chase Jarvis

So, a couple of weeks ago, there was this big photo shoot in an old hangar that Chase Jarvis and some of the flickrites put together, with a bunch of rented pro lighting setups donated by Glazers, and a bunch of models and breakdancers and bmx riders and stuff. And I haven’t put anything up here yet, but then again, I still haven’t gotten my light stands out of the trunk either.

Chase just released pics from another hangar 30 gig that he did — this one with less people and more music. Songs for eating and drinking where he got a bunch of really talented musicians and a talented cook together in the hangar, and shot pictures and video of the result.

No comments

Fraggle Rock – Tim

Fraggle Rock - Tim From the Chase Jarvis Hangar 30 Shoot

No comments

Dancer, Long exposure

Dancer, Long exposure From the Chase Jarvis Hangar 30 Shoot

No comments

The Hangar

The Hangar From the Chase Jarvis Hangar 30 Shoot

No comments

Garden Update

Well, the stuff (spinach, carrots, beets, chard) that I planted in at the beginning of August is doing well. It all sprouted really quickly, since we had a week of every-other-day rain. Nothing like heat and rain to do that. Unfortunately, it’s bringing out the slugs as well.

Then yesterday, we had a big harvest. A cauliflower. big. Two Broccolis, small and larger. A handful of beans. A carrot, a parsnip. A decent sized zucchini, 10 lbs of red potatoes, some chard that was getting de-bolted, and 4 pints of blackberries.

All of it good sized, all perfect looking and the sort of thing that would sell in the non-organic must look beautiful section of the grocery store.

The sunflowers are mostly about as tall as I am, the infrareds are out, the verigated ones are close behind. The giants aren’t out yet, and it’s getting hard to tell how they’re doing since I can’t see the top anymore. The pole beans have started to have little 1/4 inch beans show up. And the pumpkins are nuts. Huge and sprawly. And not small pumpkins either.

No comments

Lady Washington fires

Lady Washington fires

No comments

Lady Washington

Lady Washington

No comments

Hawaiian Sovereign

Hawaiian Sovereign

No comments

Fresnel

Fresnel

No comments

Next Page »