October 20, 2010
This article was contributed by Nathan Willis
For years, MySQL has been the highest-profile open source relational
database system, but with the Sun (and, later, Oracle) acquisition of
MySQL's corporate parent MySQL AB, the development community has split in several directions. Now, a few years later, both of the leading community-driven forks of MySQL, Drizzle and MariaDB, have made important new releases. Drizzle, the light-and-lean database system designed for web and cloud applications, unveiled its first beta release — complete with MySQL migration tools — and MariaDB, the full-featured database system positioned as a direct competitor to MySQL, made a "gamma" release, and picked up an important endorsement.
Drizzle beta
Drizzle build
1802 was released at the end of September, and was dubbed the "Drizzle7
beta release" in the accompanying announcement. In addition to the usual
assortment of speed-ups, bug fixes, and new options, three major features
grabbed the headlines. One is the introduction of Sphinx-based documentation. Sphinx is
a documentation system based around the reStructuredText markup format,
which is intended to make it easier to integrate application documentation
inline within the source code itself. Indeed, Drizzle is taking advantage
of this feature, storing its documentation in its source tree.
Of more importance to database users, however, are two features that
simplify the transition from MySQL to Drizzle. First, the drizzledump
backup and restore utility now has the ability to detect when it is run
against a MySQL database, and export a dump of the database in a Drizzle-compatible format. For the slightly more daring, it can also dump the MySQL database and import the data and structures directly into a Drizzle database in a single command. Either way, it eliminates the need to run a costly conversion between the two applications.
Second, Drizzle can now speak MySQL's native TCP/IP protocol. By default, Drizzle uses the same TCP port reserved for MySQL, 3306. Future plans are to develop a separate Drizzle protocol running on TCP port 4427, but for the time being, the ability to use MySQL's network protocol has the effect of making it much easier to port applications written for MySQL over to Drizzle.
This feature includes the network protocol only; Drizzle does
not support Unix sockets as a connection method, which is part of the
project's stripped-down philosophy. Drizzle was started by former MySQL
architect Brian Aker in 2007 as a response to what he felt was MySQL's
increasing focus solely on enterprise applications, abandoning many of the
project's original constituents, web application developers. Aker has said on several occasions that he wants to develop Drizzle as a community project, in contrast to the final days of his involvement with MySQL, when virtually all of the MySQL developers were employed working on the project full-time, and patches from outsiders dropped to virtually zero.
Drizzle adopted a smaller, faster "microkernel" architecture, stripping out advanced functionality such as views, triggers, and query caching, while pushing many of the remaining functions (such as logging or authentication) into pluggable modules. In several places, it simplifies MySQL's multi-faceted design, such as offering only one type of binary blob, specifying UTF-8 as the text format, and UTC as the only timestamp "time zone" format. The result is a faster database management system around one-third the size of MySQL, and one that Aker hopes will be easier for new developers to understand and contribute to.
The project allows all contributors to retain their own copyright on their contributions. The project uses Bazaar as its source code management system, making incremental releases every two weeks. Aker stated in 2009 that there were more than 100 contributors to the project, which is roughly in line with the size of the Drizzle-developers team on Launchpad.net. According to Launchpad, there are 325 active branches under development, owned by 66 developers or teams. Also telling is that the developers hail from a variety of different employers, including Canonical, Google, Oracle/Sun, and Rackspace.
In addition to the community focus, Drizzle is optimized for "cloud" and
web application usage in a number of ways. As mentioned earlier, it
provides TCP/IP as its only connection method. It is also optimized for
64-bit processors and "massive concurrency" over multi-core
and multi-CPU machines, including sharding across multiple
nodes. Finally, it is built for Unix-like servers only (offering no
Windows version), and supports external stored procedures in scripting languages like Ruby, Perl, and PHP.
MariaDB gamma
While Drizzle is an attempt to hone the MySQL code base into a lean-and-mean database manager, MariaDB takes nearly the opposite approach, building a system with an array of high-end options well suited for enterprise usage. MariaDB was started by MySQL creator Michael "Monty" Widenius in 2009, with the goal of developing a community-driven project that could serve as a drop-in replacement for the official MySQL.
The 5.2.2-gamma release of MariaDB was also announced at the end of September, and is described as a "release candidate" marking the end of the 5.2 development cycle. The list of new features is tellingly longer than that of Drizzle's, including a reworked version of the default InnoDB storage engine and two entirely new storage engines: OQGRAPH, which is designed for storing tree-like structures and complex graphs, and Sphinx, a text-oriented storage engine (this Sphinx bears no relation to the Sphinx documentation system used in Drizzle; chalk it up squarely to coincidence).
Also new is support for virtual columns (fields containing expressions that are evaluated upon retrieval), segmented key caches for the MyISAM engine (which allow multiple threads to fetch keys simultaneously without locking the entire cache), the ability to CREATE tables with storage-engine-specific attributes, an extended user statistics system, and pluggable authentication.
MariaDB 5.2.2 is based on the MySQL 5.1.50 source code, but several of the new features mentioned above — such as extended user statistics and segmented key caching — come from other sources. On top of that, some of the new functionality is still in development for Oracle's MySQL, including virtual columns. The official MySQL's pluggable authentication system is available only to Oracle customers with commercial support contracts. MariaDB comes with an authentication module that allows the system to use existing MySQL user accounts, thus easing the transition between the two products.
On the whole, however, MariaDB aims at compatibility with MySQL.
Widenius's new venture is partly an attempt to rebuild the community-based
development approach that MySQL enjoyed in its early days, and partly an
attempt to build a different business model around database development.
Unlike MySQL AB, which was sold to Sun in a deal that he engineered, Widenius describes his new business Monty Program AB as a "hacker business model" where revenue from its support contracts go directly back into maintaining the code. He also founded the non-profit Open Database Alliance with other MySQL service providers to attract various independent support providers and database resellers.
Like Drizzle, the MariaDB source code is hosted at Launchpad.net. In
contrast, however, contributors must sign a contributor agreement that assigns
joint ownership of the contribution to Monty Program AB. Monty Program AB
employees also review all patches and contributions and approve membership
in the Maria-captains
team that has commit rights. According to Launchpad, there are 21
Maria-captains members, and 149 in the larger Maria-developers group,
all working on 62 active branches.
Despite intentionally following the official MySQL development series,
MariaDB has started to attract attention on its own. Last week, a number
of former MySQL executives launched SkySQL, a database support company
competing head-to-head with Oracle's services — including support for
MariaDB alongside support for MySQL. SkySQL executive Kaj Arno told InternetNews.com "If you are a MySQL customer and your bug is fixed in MariaDB, I think it might make sense to move," though he added that encouraging customers to migrate was not the company's goal.
Lessons learned?
To say that Oracle's acquisition of Sun and the open source projects it stewarded has been poorly-received by the community would be quite the understatement. This month, the big debate is over OpenOffice.org (OOo) fork LibreOffice, and Oracle has taken a hard line: renewing its public commitment to OOo and threatening to excommunicate OOo community council members who do not distance themselves from the new project.
Looking at how well the MySQL forks have matured, however, it does not
look like LibreOffice supporters have too much to fear. Drizzle and
MariaDB are both prepared to help any interested MySQL users migrate away
from the platform. Drizzle is taking shape as a fast and light replacement
for the large market segment of customers whose MySQL database is primarily
designed to serve as the back-end of a web application, while MariaDB is actually ahead of MySQL on supporting high-end features for enterprise customers. In either case, MySQL may not enjoy its current position as the default database of choice for much longer.
(
Log in to post comments)