WordPress and Drizzle

So, for amusement, education and a desire to put Drizzle through its paces with a real-world application, I built a Drizzle database adapter for WordPress.

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.

Here’s a screenshot of WordPress running on Drizzle. Note that in the sidebar, I’m showing off two plugins which maintain their own tables — WP-PostRatings and Twitter Tools.

WordPress on Drizzle

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? 😉

On Drizzle

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:

[blip.tv ?posts_id=2312282&dest=-1]

This entry was posted in General and tagged , , . Bookmark the permalink.

18 Responses to WordPress and Drizzle

  1. Ben says:

    If people listened to warnings like “not for production,” we’d still be in caves running detailed testing plans on the functioning of stone tools.

    I hereby grant everyone permission to use this in production.

  2. mneptok says:


    What about MariaDB?

    • Jeff Waugh says:

      MariaDB is “just” an independently maintained, community developed branch of MySQL (with a new storage engine to boot), rather than a fundamental revision of MySQL’s technical goals and community structure.

      I think the ambition and fresh perspective of Drizzle will lead it to have a bigger impact than the “alternative branch” approach.

      • mneptok says:

        “… rather than a fundamental revision of MySQL’s technical goals and community structure.

        Oh really?

        I haven’t seen you participating in the MariaDB community at all, so I’d like to know where this assessment has its genesis.

        Join maria-discuss on Launchpad. Join us in #maria on Freenode. Check out how we work with the community and see if that diverges from how Sun operates.

        As you know, I’m Kurt. But I suggest you click the link. 😉

        • ldng says:

          >> … rather than a fundamental revision of MySQL’s technical goals and
          >> community structure.
          > Oh really?

          Well, yes. The first part of the sentence you voluntaryly left out is
          just stating the same as your own web site which is the point Jeff is
          making. Drizzle is NOT “a community developed branch of the MySQL”

          http://askmonty.org/wiki/index.php/MariaDB :

          What is MariaDB?

          MariaDB is a community developed branch of the MySQL database that uses the Maria engine by default.

          • mneptok says:

            Our project most certainly does strive to create a “fundamental revision of MySQL’s community structure,” which is the point I was making.

        • Jeff Waugh says:

          (I’ll preface this by noting that your reaction is surprisingly strong given that you’re responding to a post about Drizzle, and I merely answered your question about MariaDB.)

          My analysis is this: While the MariaDB project clearly has a different approach to community engagement and development, it ultimately remains a satellite to the MySQL codebase and community. That has a huge impact on its capacity to be a “fundamental revision” in either sense.

          Of the two, I think Drizzle is the obvious game-changer, both socially and technically. I don’t think this analysis is unfair or even negative. I have no reason to dislike MariaDB — I’m just answering your question.

          Of course, none of that means MySQL or its close derivatives are irrelevant now, or likely to be in the near future… in fact, that’s precisely why the growing number of MySQL forks and branches are such good news.

          We’re already seeing cooperation and consolidation among those branches. I will be very happy when we see distros shipping one of these in preference to MySQL.

          But, even if that happens, Drizzle has an incredible future ahead of it, built on a firm foundation of clueful social and technical philosophy.

  3. mneptok says:

    I asked for your thoughts on MariaDB. If you had said, “I don’t see a game-changing shift coming from the project. It’s nice to know it’s there, but Drizzle is an entirely new approach,” I wouldn’t have had much to say.

    But claiming that it’s not a “fundamental revision of MySQL’s … community structure,” when it’s my job to ensure that it is, and yourself not having participated in that community in any way whatsoever, does elicit a strong response. And I think you’d respond in the same way, were you in my shoes.

    • Jeff Waugh says:

      Okay, so you’re having a strong personal response to my answer. You asked the question! One would hope you’d be prepared to gracefully handle whatever the answer might be.

      There’s no point leaning on fatuous arguments about whether or not I’ve participated in that particular community — if you truly felt that was an important factor in my ability to answer your question, you wouldn’t have asked for my opinion in the first place.

      But seriously: MariaDB really isn’t a fundamental revision of MySQL’s community structure. For sure, the project is building a community with different (better) values, more in line with effective Open Source development, but it is still broadly subject to the whims and fancies of the MySQL project. It is effectively a branch, not a fork, with a complementary community built around it.

      Note: That is by no means a criticism of the objectives of the MariaDB project or your work within it. It is just, to my mind, an accurate reading of the situation. When Sun’s MySQL is no longer the de-facto branch, and they are compelled to participate in a community defined by the renegades (and the ODA folk are doing a pretty good job of creating that community so far)… that’s when it will be an unqualified, independent, successful and fundamental revision of MySQL’s community structure.

      In the mean time, Drizzle has essentially made its own. Pretty fundamental.

      (Back when I was doing evangelism for Canonical, I regularly received input about Ubuntu which I disagreed with — all of it, aside from the nasty and cantankerous, was useful. I generally found it more interesting and helpful to ask questions when someone raised an idea I disagreed with.)

      • mneptok says:

        I asked (somewhat obliquely) what your impressions were of MariaDB. You responded on several points, and some of them I agree with (we are not changing the way we create a database, we’re 100% MySQL compatible, fer $DEITY’s sake!).

        But to then discuss how the community works (or does not) without first-hand knowledge strikes me as talking about issues with which you have no first-hand experience. Like saying, “Ubuntu is just Debian with a different theme,” to you circa 2005.

        Sure, from the outside, Ubuntu *did* look like Debian with a brown theme. But then, no real sense of a project can be gained from the outside.

        My indignation is not caused by some perceived personal affront, but by the fact that you seem to be speaking with some authority about processes in which you have not participated. And that’s not fair.

        • Jeff Waugh says:

          Why are you maintaining this straw man? I don’t need to participate in the project to know that it doesn’t matter how much wonderful and different-to-MySQL stuff that is done in the MariaDB community, it simply can’t be a “fundamental revision to MySQL’s community structure” when it’s not revising MySQL’s community structure — or substantially shifting the goalposts (as Drizzle has done).

          Similarly, Ubuntu is not a fundamental revision to Debian’s community. It, like Drizzle, just moved the goalposts.

  4. Simon says:

    Thanks for the heads up on Drizzle. I hadn’t heard of it until now and it looks very interesting. Can’t wait to see how it gets adopted.

  5. Matt says:

    Does it work with WordPress 3.0.1?

    • Jeff Waugh says:

      Possibly, but I haven’t tested it for a while. I will probably change it to work with Drizzle via the MySQL protocol, rather than requiring libdrizzle/php-drizzle.

  6. genarg says:

    Wouldn’t be cool if the WordPress team makes an alternative version of WP 3.1 or 3.1 for testing on Drizzle?

    Would love to dump MySQL and start using Drizzle.

  7. Cam says:

    Have you gotten it to work with wordpress 3.1? and does it use the MySQL protocol yet?

    Also I’d greatly appreciate a github project or something similar for this.

  8. Eugene says:

    What can you say now about DrizzleDB, would you say it is readyy for production you?

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments will be sent to the moderation queue.