Access whitepaper

Open Source Code from Compendium

Tuesday, March 24, 2009 by Blake Matheny
Here at Compendium we use a lot of open source software and other open platforms. The list is innumerable (at least in a blog post) but a few pieces of software that we rely on include:
  • Linux (CentOS)
  • PHP
  • MySQL
  • Agavi
  • Phing
  • AWS (SimpleDB, EC2, S3, SQS, CloudFront)
  • YUI
While some of the software we write isn't an appropriate candidate for releasing to the world, on occasion we do develop stuff that doesn't offer anyone a competitive advantage and should really be open sourced. I hadn't put a lot of thought into how to actually go about releasing that software until this past week.

One of the issues that we run into is how we end up pushing static assets to our CDN (CloudFront) during releases. We have a number of static assets that change somewhat frequently (Javascript & CSS mostly) and because of the nature of CloudFront, we needed to introduce a naming scheme to deal with this. Essentially each static asset gets a different file path every time we publish it. This scheme has a few problems, including having to publish all of our static assets every time one of them changes.

After a particularly change intensive testing period required a number of publications to the CDN, we decided that enough was enough and came up with a more reasonable scheme for publishing static assets. In this new scheme, assets will be named based on their MD5 hash. This means that an asset is only added to the CDN if it has actually changed. It also meant that we needed a new way of handling renaming, compression, etc.

This required a number of phing enhancements including:
  • YuiCompression Filter to compress CSS and Javascript
  • Md5Mapper to handle renaming of a file based on the hash of the source file
  • Rollup scheme for defining Javascript and CSS rollups
  • S3 Publisher Task
We intend on releasing this as an open source project so that others can benefit from the work.  Some other pieces of work that we will over time look at open sourcing:
  • Asynchronous Logging for PHP
  • Enhanced Agavi logging subsystem
  • Yahoo BOSS Access
  • Memcache Session Storage for Agavi
  • Flexible, policy based, cache subsystem
    • Memcache
      • Includes chunking for segments greater than 1MB
    • Files
    • S3
  • Selenium Integration for Phing/Agavi/PHPUnit
A while back Google released their Google Code product. Google Code is basically a place to host open source projects. We will be hosting our Open Source code at the Compendium Code project. It is still barren but look for changes over the next few weeks as we start to publish some of the above projects to the repository.
Spread the Word

Comments for Open Source Code from Compendium

Leave a comment





Captcha

© 2009 Compendium Blogware
All Rights Reserved