Accessing your MySQL data whatever way you want it

One way to look at a database is that


  1. there is data, and

  2. there are ways to access data.

This dichotomy was actually coined (whether intentional or not) by Vinay in the MySQL telecom team when discussing the MySQL Cluster vision some months ago.

Even if you typically think of MySQL Cluster as just a clustered version of the plain old MySQL server, it is actually more like the opposite is true, if you consider the architecture and history of MySQL Cluster. The original cluster was just the data store called Network DataBase or NDB as we familiarly know it still. Then MySQL Server was integrated on top of that to provide an SQL interface. The original and "native" NDB interface is still there though, and many prefer to use direct C++ or Java access to their NDB-clustered data. It is faster just in general, but especially applications with a real-time requirement will benefit from omitting the MySQL Server. No additional network hop and no parsing of SQL, just direct access to your data. Sometimes also you might benefit from being able to do things with the NDB API that cannot be efficiently expressed in SQL at all.

But did you know that in addition to the SQL and NDB API there are actually multiple more ways to interface with MySQL Cluster available:


  • LDAP was presented at a MySQL User Conference BOF last spring and is actually available now as an Option in the Carrier Grade Edition. The LDAP interface is actually an OpenLDAP server node, using a native NDB backend in the slapd.

  • mod_ndb is a REST Web Services API for MySQL Cluster. This one is (obviously) implemented as an Apache module. Although produced by our own John 'JD' Duncan, it is not a Sun supported product.

  • We also know of a case where MySQL Cluster is accessed through the RADIUS protocol, although I don't think this implementation is publicly available.

  • And someone also does it with DIAMETER, a successor to RADIUS.

I don't know details on the 2 last ones, but at least the 2 first ones use NDB directly. That is much more efficient and convenient than for instance doing some LDAP->SQL conversions when SQL really isn't needed in the first place. Moreover, you did realize that all these interfaces are equal citizens with the mysqld - they are all just api nodes. Meaning, you could have one big cluster and access that same data with SQL, LDAP, HTTP, RADIUS and DIAMETER, and of course directly from your application code with the NDB C++ or Java API. Which brings us back to the title for this blog post: You have data and you have ways to access the data. Whatever ways suits you the best.

Then of course for the interesting question? Are there more protocols/API's out there for MySQL Cluster that we don't know about? (Or that I ommitted by mistake?) Are there some protocols there that would be interesting to implement? Let us know at hingo at mysql dot com (or comment below)!

Comments:

If I have a data in a simple table (UserName, Password) and want to use \*both\* 'Select \* from <ThisTable> where UserName = <SomeUser>' as well as doing an ldapsearch on UserName, can I do that using OpenLDAP, MySQL and the NDB API?

Posted by T S on September 02, 2008 at 12:02 PM EEST #

Yes, that is exactly the point of it. And those would then be just 2 views into the same data, it is not a separate relational database and a separate ldap directory. So your SQL and LDAP queries would always see the same data.

Posted by Henrik Ingo on September 02, 2008 at 01:59 PM EEST #

Would you be willing to share some documentation and design details? Specifically, how a relational model and a hierarchical model and some of the technical details is what I am interested in. ;-)

Thanks.

T S

Posted by T S on September 02, 2008 at 02:33 PM EEST #

Hi T S

Unfortunately it seems the implementation is still being finished, so we are not distributing either code or documentation yet. (We are offering it for select customers, but there is still some polish and bureacracy before making all of it public.) We of course will do so when the time is right. Watch this and other planetmysql.com blogs for updates on that.

Also to clarify my earlier answer: Actually the LDAP implementation does not allow for arbitrary schemas to be mapped onto a hierarchy, it has some requirements of how the table must look like. So to be strict, the answer to your original question is no, it cannot be mapped to such a table but essentially the same thing can be done for a table that has the right format. You have a table of users and you can access that with LDAP and SQL alike. Again, more info will be published sometime in the future...

Posted by Henrik Ingo on September 03, 2008 at 03:08 AM EEST #

Henrik,

Thanks for continung this dialogue. Looking forward in anticipation to the upcoming details. ;-)

Posted by T S on September 03, 2008 at 10:18 AM EEST #

Post a Comment:
Comments are closed for this entry.
About

The people of the MySQL Telecom team writes about developments around MySQL and MySQL Cluster and how these products are used by our Communitcations industry customers. (Image jasmic@Flickr)

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today