Sunday, June 25, 2006

Writing NDBAPI programs

The most powerful and efficient way to access data stored in the NDB storage engine is to use the NDBAPI, a C++ API which gives you direct access to data stored in MySQL Cluster.

Instead of having to go through the MySQL server to access data, you can access the data directly from your C++ application. Why would you like to do this? There are some reasons:
  1. Data access with minimal overhead
  2. Flexibility - posssible to hand-optimize queries. You control exactly when you want to send data to NDB Cluster.
  3. Performance - Shorter response times, because of fewer network hops (no MySQL server as a proxy) and (1,2) above.
Typically, application developers that want soft realtime characteristics on data access use the NDBAPI, and use SQL (going through the MySQL server) for OAM type applications.

In this blog, I will try to show you how to start programming your own NDBAPI applications and I will illustrate this with simple examples. It will require that you have knowledge about C/C++.

No comments: