MariaDB Dropping In On IBM i To Replace MySQL
April 4, 2016 Alex Woodie
When Oracle dropped support for IBM i with its MySQL database five years ago, it effectively slammed the door shut on a promising path to rejuvenate the IBM i ecosystem with an open source of applications. But soon that door will re-open via MariaDB, a fork of MySQL that is a drop-in replacement for Oracle’s open database. Zend‘s PHP-on-IBM i guru Mike Pavlak gives IT Jungle the scoop on what’s about to happen.
According to Pavlak, work is under way to get MariaDB running on IBM i, which it will do in the same manner that MySQL came to the platform: via the PASE (Portable Application Solution Environment) AIX runtime. Zend (now owned by Rogue Wave Software) is taking the lead on this, with support from IBM and MariaDB to make it work.
“We’re in the process of bringing MariaDB version 10 to IBM i and that’s going to be compatible with MySQL 5.6,” Pavlak says. “So anybody who has a PHP application that’s designed for MySQL 5.6–for example, the latest version of WordPress that’s available on the WordPress website–if they have MariaDB 10, that’s just as good and it will work just as fine [as MySQL 5.6]. In fact, it will work even better.”
Zend currently has an alpha version of MariaDB 10 running and IBM i, and the company is in the final stages of figuring out the packaging details. There are still some details to be hashed out regarding product management and IBM’s role in all this (it is developing a DB2 for i database engine that will plug into MariaDB in the same way it did for MySQL). These details should be ironed out soon.
“One thing for sure,” Pavlak says, “is the MariaDB release that we’re bringing out had to be compiled for IBM i, and we’re going to be providing that distribution from the Zend website.”
Antithesis of Oracle
If you liked the changes that MySQL brought to the IT community a decade ago, then you’ll love the story of MariaDB.
MySQL was initially developed by the Swedish developer Monty Widenius in 1995 to be an open source alternative to the proprietary databases of the day, namely Oracle’s eponymous database. The project picked up steam in the early 2000s and became a core component of the so-called “LAMP” stack that included Linux, the Apache HTTP Server, MySQL, and PHP.
Sun Microsystems recognized the value of MySQL in 2008 and bought it for $1 billion. Two years later, when Oracle bought Sun for $7.4 billion, the MySQL project was suddenly owned by the very corporation that it was initially created to compete with.
While the MySQL project ostensibly remained in the open source realm, Oracle retained tight control over the release of the binaries, which caused problems for things like the IBM i port. So when Oracle announced in late 2010 that it was ceasing to support a MySQL distribution for Power platforms, it really shouldn’t have come as much of a surprise.
“The folks at Oracle have made it very clear that they’re just not interested in producing distributions, anything for Power Systems,” Pavlak says. “Okay, that’s their right. They don’t have to provide a distribution of MySQL, which is why we worked with Percona to deliver it.”
Pavlak here is referring to DBi, an IBM i release of the MySQL database that it released in 2011. Zend subsequently tapped Percona to care and feed for DBi a year later. However, while Percona maintains DBi, there have been no new releases of DBi, which languishes as a MySQL 5.1 port.
That brings us back to our story. A year after selling out to Sun, Widenius founded MariaDB to essentially carry on the work of developing MySQL. (Like MySQL, Widenius named MariaDB after one of his daughters.) Pavlak describes the significance of the move.
“MySQL was created to be the antithesis of Oracle. It was designed to be free and open source and to give people alternatives and options,” he says. “A lot of people were afraid that Oracle would destroy MySQL. Now that certainly hasn’t come to pass. However, the principals at MySQL. . . set out creating essentially a fork of the MySQL database called MariaDB.”
Set for Power
A key part of MariaDB’s business strategy is embracing IBM Power Systems, which Oracle has (understandably) turned its back on. IBM has reciprocated the love, and the result is a rekindling of open source databases on Power. See the video below to hear Widenius raving about how fast MariaDB runs on a Power8 server running Linux.
While PowerLinux is the main target for MariaDB, it’s a natural extension to get MariaDB available to IBM i shops. The folks at Zend realized the potential, and ran with it. “The point of the matter is the folks at MariaDB love Power,” Pavlak says. “Why would you get in bed with somebody who hates you versus someone who loves you?”
Another factor in the MariaDB equation is support from the developer community. According to Pavlak, MariaDB has become “wildly popular.” That momentum is evident in MariaDB rising to number 21 on the DB-Engines.com database rankings.
“We’re starting to see more and more companies adopting MariaDB in their production and development applications, because it technically runs faster than MySQL, which is cool,” Pavlak says. “And it has some additional features and frankly very few incompatibilities, so it truly becomes a drop-in replacement.”
MariaDB is technically a fork of MySQL, and MariaDB 10 is fully compatible with MySQL 5.6. The last release of MySQL from Oracle that ran on IBM i was version 5.1. But many open source products developed in PHP, Ruby, and Node.js require the latest release of MySQL. That’s a problem for IBM i shops, who are stuck with MySQL 5.1.
“The MySQL variant that we’ve been running on IBM i for quite a long time has been meeting the needs,” Pavlak says. “But people are starting to outgrow it. We’re getting to the point now where a customer calls us up and says ‘I want to run the latest version of WordPress and it won’t work with MySQL 5.1. And the question is, am I going to get an update to MySQL? And the answer is you betcha, and it’s coming soon.”
And the new version of MySQL just happens to be called MariaDB.
In addition to being compatible with MySQL 5.6, MariaDB 10 has some performance advantages that should translate to apps running on IBM i. According to Pavlak, MariaDB’s query optimizers give the database a 20 percent to 60 percent performance advantage in returning queries.
“That translates to, instead of waiting 500ms for a query to come back, now we’re waiting 200ms or less,” he says. “This is going to speed up your overall applications and that’s a huge, huge advantage. Performance is probably the number one reason why we’re seeing people move from MySQL to MariaDB.”
MariaDB also offers nearly twice as many storage engines than MySQL, he says. Storage engines are a unique aspect of MySQL (and other open source databases) whereby a user can easily plug third-party engines into the database to perform specific tasks, such as running analytics queries in-memory or speeding transactional workloads.
IBM also developed a plug-in storage engine for MySQL that enabled DB2 for i to be the underlying storage engine, while keeping the MySQL interface for applications. IBM is re-developing that storage engine to work with MariaDB, Pavlak says.
“We’re pretty excited about pushing MariaDB out there, and also pushing it out there with more frequent updates, which is going to be part of our game plan,” Pavlak says. “We have no plans to do any further work on MySQL.”