Puakma: Under the hood

I'm Brendon Upson, jack-of-all-trades, master of one or two. I'm talking about life running a small ISV tackling business issues and leaping technology hurdles in a single bound.

webWise Network Consultants is based in Sydney, Australia and develops the groundbreaking Puakma server technology.


Tornado's new composite design elements

Filed under: by Brendon Upson on 10:55

Hot on the heels of "Idea #21887 for Tornado server" is the new composite design element functionality.

The problem:
You like to store each of your javascript methods in seperate files so that like functionality is all grouped together. For example, maybe you put all your validation routines in one, you use prototype, mootools, ajax routines in another and so on. This make it easy from a development and maintenance perspective to keep up to date and find things. However, from a performance perspective the web app becomes sloooow. This is because for each included resource (css, javascript), the browser must ask the server if it has changed. Mostly the server replies with a "304 Not Modified", but the browser still has to ask, just in case, and there's a small overhead with each request.


The solution - Composite design elements:
We now have a new design element for example called "all.js". This design element is tagged as a composite and simply contains a list of other resources or filesystem based files to imclude into one larger file. Each page in the web app only links to "all.js" and Tornado takes care of assembling that file on the fly. Plus, you can use Tornado's built in ability to shrink the javascript AND it's dynamic gzip ability to compress that minified file. That's 3 perfromance optimizations layered on top of each other :-) The following is what it looks like in the webdesign app, 9 separate javascript files that get amalgamated and sent as one to the browser:



This will work for any text based resources!


Your comment

Protected from spambots!

HTML is allowed
Formatting: Basic formatting can be included like so:
[b]bold[/b] and [i]italic[/i]