Search This Blog

05 October 2007

External Language Stored Procedures

Yay! It's the weekend!

Why does the weekend make me cheerful? I get time to spend on personal projects, although my sweet wife does complain that my 'personal projects' don't look much different than my day job.

This project, I have been doodling with for quite a while. It spawned from a little project that Eric Herman and myself started to look at 2 years ago with what we called "MySQL UDF v2". At the time, it included a whole plug-in and unit testing framework. Since we have to work with what is in the server, we dropped our plug-in and unit test framework after the current MySQL 5.1 plug-in system suddenly appeared: Somehow, I ended up maintaining it but that's another story.

A more modern and sane system for user-defined functions is still our goal. One part of our concept is to minimize the amount of 'heavy lifting' that needs to be done in C in order to create a new language plug-in. Eric being the happy Java guy that he is, is working on the Java stuff and for some crazy reason I have decided to take on Perl as an interesting challenge.

Alas, we never get much solid time to work on this project - The bulk of the effort is done during MySQL developer conferences, the most recent was the Heidelberg conference which finished only a few days ago. Heidelberg was significant because Eric and I successfully demonstrated Java UDFs working with a SQL standards compliant CREATE declaration and the Java function demonstrated was a simple string reverse method, although it is capable of much more.

We have every plan to continue working on this project - it is fun, especially now that we can demonstrate it. I have thrown together a cron job which will make a snapshot of our work repository and publish it on my personal website.

Words of encouragement or even code are all greatly appreciated.

Re: Gemini, Forgotten about this one aye?

Brian mentioned Gemini on his blog... As many people remember, there was a stunned silence for a while when Oracle purchased InnoBase OY only 2 years ago... Very similar to the stunned silence about 6 years ago when the suits at NuSphere tried to do a SCO. Back on to the topic at hand... Gemini. About two years ago, Brian fed me a copy of the Gemini engine saying that "Hey, you remember Gemini? Here's the code. Get it working. Don't talk about it and call it 'Amira'.". Perhaps not exactly his words but close enough.

So the Amira project had a shaky beginning... I ported the code to work on MySQL 5.0 and started examining it, removing platform-specific code, and improving the performance of it. From the first working run to the last, I think performance improved by about a factor of 10 but I don't remember specifics. The Amira project was cancelled 2Q2006. I suppose the reason why would be due to the problem of ownership - the code may be GPL but it is still copyrighted by NuSphere. No better position than the situation with InnoBase's GPL storage engine.

Now Brian has released the original code. I suppose I can commit to his repository a updated Gemini/Amira which works as a storage engine plug-in for MySQL 5.1... And if I have time, I could work on additional performance improvements which was planned but never implemented.