Updates to NDB/Connectors

The NDB/Connectors have added support for Ruby, as well as Asynchronous Transaction support for Java, Python and Perl.

The Ruby support, of course, means that new you can interact with your MySQL Cluster installation using the NDBAPI from all your Ruby code.

The async stuff is especially cool, because it means you can send transactions to the Cluster and get responses by way of callbacks defined in the connector language. So you can do something like this:

class testaclass(object):

def __init__(self, recAttr):
self.recAttr=recAttr

def __call__(self, ret, myTrans):
print "value = ", self.recAttr.get_value()

#snip

myTrans = myNdb.startTransaction()

myOper = myTrans.getNdbOperation("mytablename")
myOper.readTuple(ndbapi.NdbOperation.LM_Read)

myOper.equal("ATTR1", 245755 )

myRecAttr= myOper.getValue("ATTR2")

a = testaclass(myRecAttr)

myTrans.executeAsynchPrepare( ndb.Commit, a )

myNdb.sendPollNdb(3000,1)

May not seem as exciting with just a single operation - but you can toss tons of them down there and then poll for the results.

We've also added support for exceptions in the Connector language. So instead of checking if return values are null or -1, the wrapper code will throw a Java or Perl or Python exception.

There is a also a new mailing list at lists.mysql.com for discussion of the development of the NDB/Connectors. Come join us and have some fun!
0 comments

NDB/Connectors for MySQL Cluster on Launchpad

I've been given the go ahead to release my NDB/Connectors code. These connectors wrap the NdbApi for a variety of languages, including Python, Perl, Java and C# at the moment. I'm managing development using Launchpad, so go to

https://launchpad.net/ndb-connectors

To get the latest version or status of the code. If you would like to contribute, feel free to branch a copy of the source using bzr and send me a revision bundle. There is also an ndb-connectors team on launchpad you can join if you'd like to participate more directly in the development. For either of these options to work, you need to first sign the MySQL Code Contributor License Agreement to assign copyright of your contributions to MySQL, Inc.

I hope to have a mailing list set up soon for discussion.
0 comments

NDB/Connectors 0.1

So I've expanded the scope of the NDB/Python wrappers I was working on. Now I've got Python, Perl and C# wrappers working, at least for basic functionality. I've setup a trac instance and put a roadmap and all of that type of stuff up. If you are interested in hacking, let me know and we can talk about subversion access and all that.

For the moment, I've turned off code downloading. I'll post again when I've enabled it again.
0 comments
Tags: db perl python code