Oracle rigs MySQL for NoSQL-like access

30.09.2011
Speculation has been that Oracle may introduce its own NoSQL database at the OpenWorld conference, in San Francisco.

While Oracle thus far has been quiet over the past few years, its developers have been at work devising ways to bring NoSQL-like speed and flexibility to its MySQL open-source database.

For OpenWorld, Oracle has devoted to something called the Oracle NoSQL Database. The work that the company has done thus far to equip MySQL with NonSQL functionality might provide a clue as to the nature of this new offering.

Oracle's work has focused on combining the responsiveness of NoSQL systems with the full range of options of SQL-based systems such as Oracle's own.

Oracle's potential secret weapon for revving SQL to NoSQL speeds? The Memcached caching technology, which Facebook and many other services already use. The company is looking at at least two ways of combining Memecached with its open-source MySQL database.

NoSQL databases have been commonly praised for the speed at which they can serve and ingest data, when of traditional SQL systems such as Oracle's. However, they for language for working with data, something that SQL provides.

Also, unlike NoSQL, SQL also , called ACID (atomicity, consistency, isolation, durability) that mathematically ensures that each database transaction is handled reliably.

In an interview in May with the IDG News Service, Tomas Ulin, Oracle vice president of MySQL engineering, described a project to bring the NoSQL-like speed of access to SQL-based MySQL.

"We feel very strongly we can combine SQL and NoSQL," he said. "If you have really high-scalability performance requirements for certain parts of your application, you can share the dataset" across both NoSQL and SQL interfaces.

The key to Oracle's effort is the use of Memecached, which Internet-based service providers, , have long used to quickly serve MySQL data to their users. Memcached creates a hash table of commonly accessed database items that is stored in a server's working memory for quick access, by way of an API (application programming interface).

Memcached would provide a natural non-SQL interface for MySQL, Ulin said. Memcached "is heavily used in the Web world. It is something [webmasters] already have installed on their systems, and they know how to use [it]. So we felt that would be a good way to provide NoSQL access," Ulin said.

Oracle's thinking is that the Memecached interface can serve as an alternative access point for MySQL itself. Much of the putative sluggishness of SQL-based systems actually stems from the overhead of supporting a fully ACID-based query infrastructure needed to execute complex queries, industry observers said. By providing a NoSQL alternative access method, Oracle could offer customers the best of both worlds--a database that is fully ACID-compliant and has the speed of a NoSQL database.

With Memcached you are not accessing the data through SQL, but by a simple key-value lookup. "You can do a simple key-value-type lookup and get very optimal performance," Ulin said.

The technology would not require any changes to MySQL itself. "We can just plug it in," Ulin said. He added that Oracle was considering including this technology in the next version of MySQL, version 5.6.

One precursor to Oracle's work is a MySQL technology developed by developers outside of Oracle, , which also used Memecached as the basis of MySQL access, said Peter Zaitsev, the founder and CEO of MySQL service provider Percona.

With HandlerSocket, "you could get close to 1 million lookups per second on a single server, which is almost 10 times what you could get with a MySQL interface," Zaitsev said. Percona has already installed HandlerSocket MySQL implementation, Percona Server.

Oracle's own planned NoSQL access for future editions of MySQL would draw heavily from HandlerSocket, though it would stick more closely to the Memecached API, Ulin said.

In a different project, Oracle developers have also devised a similar Memecached setup for MySQL Cluster, the fault-tolerant edition of MySQL designed to run across multiple servers.

At the NoSQL Now conference, held last month in San Jose, Oracle MySQL developer John David Duncan outlined a number of earlier attempts to provide alternative non-SQL access to MySQL Cluster, including the Java-based ClusterJ and a JSON (JavaScript Object Notation)-based module called mod_ndb. Both of these approaches were cumbersome, whereas the Memcached API seems to provide a natural wrapper for the MySQL, he noted. Currently the company offers a preview edition of MySQL Cluster version 7.2 with a Memcached interface.

"We thought any MySQL Cluster can natively provide performance that is closer to Memcached than MySQL server," he said. The cluster in fact provides a way of making the Memchached cache persistent, meaning it will not disappear should the servers lose power. "We can achieve the performance you would expect from Memcached," he said.

The IDG News Service