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:
[PYTHON] 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) [/PYTHON]
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!
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:
[PYTHON] 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) [/PYTHON]
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!