Case study: how Oracle licensing drove us into the arms of Maria

Online retailer Greetz tells Computing how migrating to MariaDB has allowed it to grow and innovate

Oracle's inflexible licensing policies have lost it another customer. Dutch online greetings card retailer Greetz has joined Google, Red Hat and others in migrating to open-source MySQL fork MariaDB.

"We were using Oracle RAC [Real Application Cluster]" Jan van der Veen, development manager at Greetz, told Computing.

"We wanted to have a real-time replica of our production database in our office in case of disaster but we weren't able to have this under our existing license - we were allowed to install the software but not run it," he explained.

Greetz had originally moved to Oracle RAC from MySQL in order to become compatible with a large US partner. Lacking an Oracle DBA, Greetz employed a third-party consultancy to manage operations.

"Oracle was a sure bet in terms of performance, and performance has never been a problem", van der Veen said, when asked why Greetz had selected the vendor, explaining that other architectural changes were made at the same time.

"When we moved to Oracle we replaced the [MySQL] database layer with an ORM [Object Relational Mapping] layer called Hibernate - which incidentally is the tool that made it easier for us to move away from Oracle," he said.

A key factor in last year's decision to move away from Oracle was Oracle's database licensing terms, which became increasingly restrictive as the firm grew. Van der Veen believes this is a serious problem, especially for SMEs.

"The licensing structure in place was impeding us from evolving and hindering innovation," he said. "For smaller companies in the growth phase, if they have an alternative will they ever have an incentive to go back to Oracle? I don't think so. After all they're not the cheapest."

The Greetz board would not fund extra licenses, van der Veen said, because risk mitigation adds nothing to the bottom line or customer experience. Instead his team was forced to use adopt some clunky workarounds in order to perform normal IT and business functions.

"We had an Oracle datawarehouse on which we ran Tableau for BI. To [avoid having to license a replica database] we would pull data - almost the complete database - out of Oracle every night and import it into MySQL for analysis," he explained.

"With our new database solution we don't have to do this any more because we have a replica of the live database and we run our analyses on that."

Greetz migrated to MariaDB in September last year. The migration process was performed by SkySQL, an open source technology vendor and service provider that boasts MySQL and MariaDB creator Michael "Monty" Widenius as a director. SkySQL configured MariaDB to work alongside Greetz's existing Linux, Galera, Hibernate and Ansible platforms.

Why, Computing asked, did Greetz not simply revert back to MySQL (which of course is now maintained by Oracle)?

"Monty explained to us about where MySQL is going in terms of bug fixing and it confirmed what we were thinking: that MySQL is not a high priority for Oracle. The future of MySQL as a non-licensed product is not clear."

Van der Veen explained that Greetz did not want to bet its future on a database that might one day start charging for essential functionality. In its search for an alternative, Greetz also looked at PostgreSQL but decided MariaDB was a better fit, given the existing MySQL skills in the extended IT team.

"We already had the ORM layer in place and the knowledge of the team clearly spoke to a MySQL-based solution. The attitude of the open source community towards Maria really swayed us. It's where the majority of the community is going."

Greetz is employing SkySQL's remote DBA service for most operations, but van der Veen says the new system allows his team of experienced MySQL developers to be more hands on.

"Developers are able to get more accomplished with Maria [than with Oracle]. There is an abundance of online materials," he said.

[Next page: hiccups during migration]

Case study: how Oracle licensing drove us into the arms of Maria

Online retailer Greetz tells Computing how migrating to MariaDB has allowed it to grow and innovate

So how easy was it to migrate from Oracle RAC to MariaDB?

"For us it was relatively easy because we used the ORM, which is really an abstraction layer of the database language, so Hibernate takes care of the dialect changes between Oracle and Maria. We also put in a lot of effort to make sure all the right checks and balances were in place to ensure no records went missing."

Avoiding data loss was very important. Greetz processes more than 6 million online transactions each year and it was essential that customer details and purchasing history remain fully traceable and auditable.

The Greetz website was taken down for a day and a half while the 300 GB database migration took place. The company is using MariaDB in a clustered topology with three database servers, one primary and two replicas for failover. There was a hiccup in the migration, van der Veen said, when the third database server was being populated.

"Starting the synchronisation of the third database from the second database a malfunction occurred that killed the two replicas."

However the problem was solved following a patch release of MariaDB and since then van der Veen said everything has gone smoothly.

"The system has been completely stable; it's low maintainance, extremely fast and we're very happy with it," he said.