Showing entries 371 to 378
« 10 Newer Entries
Displaying posts with tag: Python (reset)
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) …
[Read more]
Some previous MySQL Confererence posts

Just for reference, here are some previous posts I did for the 2005 MySQL User Conference:

Not that these are particularly awesome or anything, but there are a few travels notes which may possibly be useful if you decide to go this year, since it's in the same location.

If you have the time, and you are from outside The Valley, catch …

[Read more]
MySQL Conference & Expo 2007

Thanks to a gift from MySQL AB, I'll be attending the MySQL Conference & Expo 2007. I presented at the 2005 conference, and found the conference itself to be pretty educational. Plus the food is generally pretty good at the O'Reilly conferences. Of course the real reason people to conferences is for the swag. Now this year's PyCon had some pretty good swag; I got at least six free T-shirts and two Rubik's cubes. So top that.

Django and UTF8

I have to deal with it now and a lot of other people too, judging by the utf8/unicode/encoding topics on the django mailing list. I have found this one thread quite interesting and looks like the problem solver, but may be I also just need to learn a bit more about the bits and pieces that make this whole thing work. This message obviously tells how to make mysql completely aware and well-handling utf8.
Next thing on the list the django setting parameter DEFAULT_CHARSET.

Multithreading with MySQLdb and weakrefs

I was fighting four days now, with a threading problem, which are known to be hard to track. But I finally found it and learned that I actually had made a beginner’s mistake.

What happened?
From the front end I trigger via AJAX a view that again starts a thread that does some import work, that might take quite a while. This enables the user to keep going and have the import run without interrupting him/her. Every once in a while an asynchronous call checks on the state of the import.
And here lies the problem: while the thread is running and busy like a bee adding data in the DB the asynchronous call to check on the state also tries to run a query and that causes the following exception:


...
 File "/Users/cain/programming/django/trunk/django/db/backends/mysql/base.py",
line 42, in execute
   return self.cursor.execute(sql, params)
 File …
[Read more]
NdbObject

Here’s a very rough pre-release of NdbObject, an ORM mapping for python that maps Objects to NDB directly with no SQL code.

NdbObject.tar.bz2

NDB/Python 0.1

I’m happy to release version 0.1 of the NDB/Python bindings. They are very young and not very well documented yet, but email me if you are interested in them and especially if you are interested in helping out. I’ll get a Trac system up and going (or something) or maybe sourceforge or savannah or google code or you know, whatever.

python-ndbapi-0.1.tar.bz2

MySQL Meetup 2006/05/01

Hannah, Scarlet and I attended the Seattle Meetup, since we heard Arjen was planning on being in town. We went to the normal location, but the owner told me they were closed due to their entire staff being involved in the civil rights

[Read more]
Showing entries 371 to 378
« 10 Newer Entries