« April 2005 | Main | June 2005 »

May 09, 2005

Better transactions

I have improved the retry mechanism for my simple transaction library. There are two improvements: Firstly, memory usage is now constant with relation to the number of retries. Second, the time that a thread will wait until it retries is now calculated in a smarter way: the more a thread has retried getting the lock, the more it will wait until it tries again.

The current version of the library is useable, but there are at least two things that I think should be improved if one wants to use it in real applications:

  • Allow more user control on the way the wait time before a retry is calculated — as this is key to the performance one will get. This could be done by supporting "pluggable wait policy" for example.
  • Implement an even more optimistic policy that does not lock variables at all, but instead calculated the entire locked section as if it was alone, and only once this is done, just before committing, test whether some other thread was messing around with the data.

May 05, 2005

ScalaDBC: first results

I have obtained the first data from a database through ScalaDBC. Nothing extraordinary yet, but at least, something is working. I will now expand ScalaDBC's capabilities (it is very limited for now) and smooth all edges that are still a bit rough (and there are plenty of them).