« JIT MySQL Session Coverage | Main | MySQL Runs 60 to 90 Percent Faster on Sun? »

April 25, 2006

MySQL Cluster API: Hidden Magic

Second session of Tuesday morning at the MySQL UC is Johan Andersson's talk NBD API: Using MySQL CLuster's Hidden Magic. Sitting with Mikael (Ronstrom), one of the original cluster developers who came over to MySQL from Ericsson and is noting some additional details about this stuff (as noted in parens).

The NDBAPI is a transactional native C++ API to access cluster data nodes. Be aware, there is no (or very little) support for this on the forums.

(from Mikael) Using the API gives you monumentally better preformance than going through the MySQL server (which is also built on this API). Mikael can get over 110,000 reads/second on his lone development box running both the storage nodes on the same box (a Dual core 2.8 GHz machine with 2G RAM).

What does it give you?

(another note about no support on forums)

Batching and Modes of Operation

Johan describes making inserts in synchronous individual inserts, batching them, and batching them asynchronously on a slide.

(Mikael notes using batches to process data is one place where you can get a huge performance boost).

Life of a Transaction

Johan shows a list of the main API classes. A pretty good list that's way too much to cover here. Hopefully slides will be somewhere.

Live Example

What do you need to tap into the API:

DDL operations must be through the MySQL server, can do it through the API but then won't be able to see the tables in the MySQL server.

Johan works through a code example of connecting to the cluster management node, creating a cluster object, connecting to the storage nodes, specifying an operation, committing that operation, and closing the transaction.

This is pretty cool stuff, but likely not something I'm going to be using anytime soon. It is helpful to see the API interface to the cluster to help understand how the internals of MySQL Cluster work.

Posted by mike at April 25, 2006 2:55 PM