WordPress.com’s Job System – Cron for PHP in Distributed Environment

Colleague Demitrious Kelly (meech, Apokalyptik) earlier this month open sourced the (Unix process) jobs system he (primarily) has been developing for WordPress.com. Not that I really understand it, but “jobs” is described as

A fast, distributed, horizontally scalable system built upon linux, php5.2, and mysql 5.1 wherein work can be stored in a database, and processed outside the flow of script execution. Examples of common things that are part of script execution but not necessary to the rendering of the response to the user might be spam scanning, statistical analysis, email notification sending, processing input data, etc. Also included is an equally distributed cron mechanism to remove single servers as a point of failure for scheduled jobs.

There are a lot of terms I like in there like fast, distributed, horizontally scalable, scheduled. It could probably benefit from robust and fault tolerant. Any others?

Anyway, this crontab-like system for PHP scripts is an essential part of our WordPress.com infrastructure, and I’m really excited to see it open sourced!

Check out code.trac.wordpress.org for other pieces of our puzzle that don’t have pretty project pages.