Last week I attended the Web Builder 2.0 Conference in snazzy Las Vegas, Nevada. This year, the name of the game was ajax, Ajax, and AJAX. Our beloved PHP had a decent representation throughout the various sessions, but no more than during my own "PHP Powers Mashups" talk. At the conference I bumped into PHP security guru and buddy Chris Shiflett, and met some new folks like Cal Henderson from Flickr and Ask Bjørn Hansen. Normally, you’ll find me working the Zend booth at this kind of conference, but this time I was free to attend sessions. I decided to post my notes on the most interesting things I saw at the conference, presented to you here list style.
- Compress – Use compression to save bandwidth and speed up downloads. Use JSMin or ShrinkSafe along with Apache’s mod_gzip.
- Cache – Why bother re-requesting static data when the browser can cache? Use FireFox plugins like TamperData to make sure caching is happening like it should.
John Allspaw, manager of technical operations at Flickr shared some interesting statistics about the site–along with a great talk about capacity planning.
- Flickr hosts over 300 million photos, of which about 25 million are cached over 14 Squid servers at any given time, and about 1 million of those photos are cached in RAM.
- Flickr does about 2 billion MySql queries a day.
- Flickr serves about 21 thousand memcached requests/second.
- Flickr uses about 1.9 Petabytes of raw disk space.
Other "Neat Stuff"
The rest of my notes are technologies that are new to me, or things I want to check out in more detail. While most of these aren’t PHP related, they are related to web development, and as they say, knowing is half the battle.
- Google offers a TON of resources for the mashup-minded. I was happy to see that many of the AJAX offerings allow developers to tweak the presentation as they see fit. Check out the AJAX Search API to roll your own Google-powered search engine. Plenty of examples are available to copy and tweak.
- XAP, The eXtensible Ajax Project is a 100% client-side AJAX framework. That means it should be easy to use PHP on the backend. Examples are here. The company originally behind XAP has a editor called Nexaweb Visual Editor that lets you build XAP apps with Java.
- Varnish is an up and coming high performance caching reverse proxy. Several speakers talked about it as an alternative to Squid.
- Check out Ganglia. I’m already an avid Cacti user for server monitoring.
- To really benchmark your infrastructure, use real load instead of artificial benchmarking tools. Carefully remove machines from your clusters and monitor the results.
- User innodb_file_per_table to split up your innodb tables in MySql. Save some disk!
- MogileFS is an open source, redundant, distributed file system. It’s also an anagram for "OMG Files".
- Gearman is an open source system for parallel processing and job queueing. Perl.
- CRAP for better graphic design: contrast, repetition, alignment, and proximity.
- The Yahoo! User Interface (YUI) Library has something for everyone. Make browsers act the same. CSS Grids provide 200 layouts in 2kb.
- ICEFaces is a Java application framework to do AJAX push.
- Benchmarking AJAX: On the network, AJAX causes higher utilization because of more requests. Because the requests are smaller, they also don’t utilize the network efficiently. The end result is a high average network load with fewer peaks. Non-AJAX load is typically low average load with high peaks.
- ASP.Net 2.0 has a built in Profile class to handle personalization. Think $SESSION[‘User’] with some built in attributes–and it persists from session to session.