Rather than completely dumping the native wpdb class (as most WordPress database adapters appear to do), I have subclassed it, replacing only the methods which use mysql_ functions.
This way, it’s easier to maintain, and more likely to work with plugins and future versions of WordPress. I have also written a cheesy, retroactive test suite for wpdb… I haven’t done a lot of TDD, so I have no idea if it’s any good, but it was helpful during development. 😉
Because Drizzle has removed column types and various bits of syntax that WordPress (and heaps of plugins) rely on, the adapter does a tiny bit of query munging along the way. For now, the only filters required are for CREATE, ALTER and friends.
To test this bad boy out — because it’s absolutely not for production blogs! — you’ll need the Drizzle server (and its dependencies, naturally), the Drizzle PHP extension, WordPress 2.8 and my adapter. Note that I have yet to test it with WordPress MU, but it shouldn’t require many changes if it doesn’t work already.
If you use Ubuntu and want an easier time of it, you can get almost everything from the following PPAs. The Drizzle server isn’t packaged, but it’s incredibly easy to build and changes so quickly that you’ll probably find you want to keep it up to date from the source anyway.
deb http://ppa.launchpad.net/drizzle-developers/ppa/ubuntu hardy main deb http://ppa.launchpad.net/jdub/devel/ubuntu hardy main
(I have only built my packages for Ubuntu 8.04, hardy, but you can always just grab the source packages and build them for whatever you’re using.)
Make sure you install the database adapter before you go through the WordPress install process. In every other respect, your test blog should operate in a completely unsurprising manner. Except when Drizzle crashes… but that’s precisely why you’re testing it, right? 😉
I am incredibly impressed with the Drizzle project. It’s a living case study of Open Source innovation and project renewal.
In response to what could be regarded as the unadventurous maturity of the MySQL project, the Drizzle developers have not simply chosen a new goal and forked the code — they have crafted a mission based on an insightful reading of current and future needs, questioned everything about MySQL without throwing away what they had learned, and thoroughly redefined their expectations and model for community collaboration.
It’s the perfect application of Software Freedom’s most functional of permissions: the freedom to fork. Like other forks built on both technical and social foundations — such as Firefox and, coincidentally, WordPress — I think it will eclipse its predecessor. Yes, even the mighty MySQL.
I hope that what the Drizzle developers have done will teach and inspire other projects to look beyond their own horizon.
Here’s a rocktastic presentation by Brian Aker, “Drizzle: Rethinking MySQL for the Web”, from the recent Open Source Bridge conference: