Maik Schmidt: The story of ruby-db2 is a bit complicated. The project has been initiated by Michael Neumann several years ago, because he needed a Ruby binding for DB2. Today he does not use DB2 any longer and so he stopped maintaining ruby-db2.
Having looked at the ruby-db2 implementation, I came to the conclusion that I would not like to maintain it. Perhaps others may come to different conclusions, but if history is any guide, I doubt it.
I see a set of several intersecting problems.
I see a need for a complete, maintainable, documented, and uncompromising “direct to the metal” interface to DB2. At the moment, I don’t see ruby-db2 getting there. By contrast, I do believe that I can attract others (in particular, in the DB2 development organization) to help maintain and document and interface which precisely matches the PHP-DB2 interface.
I agree with David Heinemeier Hansson that ActiveRecord’s DB2 support should build upon such a base instead of another layer of abstraction. Looking at the existing implementation, it is fairly small, and mostly has to deal with the fact that the ability to bind parameters is somewhat lacking in Ruby-DB2. In summary, switching to the base that I started would result in a smaller, faster, and more maintainable ActiveRecord implementation.
Finally, there is a need for a dbi-next interface to DB2. That, too, could be built on the same base.
I guess it comes down to this: how to we quantify and locate the “lot of people” who are using ruby-db2? Given the current state of the documentation and completeness, I have my doubts that there are all that many.
Note: I am not talking about anything that needs to be decided this week or next, but instead trying to determine the direction that we should take in the upcoming months to rebuild a foundation that will last for years.
Having looked at the ruby-db2 implementation, I came to the conclusion that I would not like to maintain it. Perhaps others may come to different conclusions, but if history is any guide, I doubt it.
People did not maintain ruby-db2 in the past, because it wasn’t needed. Ruby simply hasn’t been popular enough for commercial databases. Now the situation has changed and I came to the conclusion that I could maintain it. Simply put, it consists of a single file: db2cli.c.
I see a need for a complete, maintainable, documented, and uncompromising “direct to the metal” interface to DB2.
Agreed.
At the moment, I don’t see ruby-db2 getting there.
I took it over one week ago. No one really cared for it for years.
By contrast, I do believe that I can attract others (in particular, in the DB2 development organization) to help maintain and document and interface which precisely matches the PHP-DB2 interface.
I don’t see the point in copying the PHP-DB2 interface. In my opinion the driver should reflect the DB2CLI. Build on top of it whatever you need (DBI, ActiveRecord, PHP-DB2, ...).
Looking at the existing implementation, it is fairly small, and mostly has to deal with the fact that the ability to bind parameters is somewhat lacking in Ruby-DB2. In summary, switching to the base that I started would result in a smaller, faster, and more maintainable ActiveRecord implementation.
The current ActiveRecord implementation is both small and maintainable. As long as I do not run into any performance problems, I cannot say, whether it’s fast or not. Currently, it is sufficiently fast and I will optimize it, when it’s necessary. Even more important: it’s stable.
I guess it comes down to this: how to we quantify and locate the “lot of people” who are using ruby-db2?
I don’t know how many there are and I will not make any assumptions, but I could imagine that there are more people out there using ruby-db2 than using the new implementation.
Given the current state of the documentation and completeness, I have my doubts that there are all that many.
Of course, the documentation needs to be enhanced and some functions are missing. But it was absolutely sufficient for my needs. It took five minutes to download, compile, and test it and it provides all DB2CLI functions you usually need. At least it was sufficient to build an adapter for ActiveRecord.
Anyway, I absolutely understand your concerns and I’m sure that one year from now the DB2 binding for Ruby will be a completely different one. I only want to prevent irritations and compatibility problems. There are too many Oracle drivers for Ruby already and I hope that we’ll find a better solution for DB2.
the “lot of people” who are using ruby-db2
I would think that between the ever-growing popularity of Rails and IBM’s recent release of DB2 UDB, that “lot of people” will be getting “lotter” and “lotter” :-)
FYI: The trial version of DB2 Express-C has not successfully downloaded for 2 days now - the downloads do not open (corrupted) and when we heard about the new free version, we then attempted to try for that, but the page is unavailable http 500 error.
As we are a large fledgling client that has suffered through major teething problems with our regional Data Warehouse running on DB2 UDB, IBM is concerned about loosing us as a client as the rest of the global groups are using Oracle.
They have now initiated a weekly conference call / breakfast meet, where we can voice our complaints in person.
On behalf of the Ruby community I can raise the issue of DB2 connectivity etc, but will need some pointers from you guys, as I will probably abandon Ruby and use our java team back in SAfrica to develop the task I had set out to do.
i.e. another day of fiddling has got me no closer to getting the setup.rb / extconf.rb to set the IBM directories against my current DB2 UDB client directories.
I’m not blaming the tool as it is probably due to my lack of desktop development know how in using s/w that one has to configure manually.
But having said that, I feel that there is a definite lack of a basic ‘get up & running’ asap for non developers in a corp that use alternative technologies - i.e. I use some major s/w and have a cluster of BusinessObjects web servers running on Windows/Apache/Tomcat that I installed and now administer myself, so running small ruby examples displaying a pre-typed sentence is not what i need to get going asap.
And, although I’m probably a tad upset about my current experience to get into the open source environment, I don’t think I’m being totally biased.
I hope I have identified a possible hurdle that stops most corporate workers from attempting the same, as we typically try something like this as an alternative, but generally have our normal tasks and day to day activities restricting us from going through the usual ‘Hello World’ route.
The fact that we are technically adept would have us benefit more from a small but complex logical example that reads an rdbms (not a txt file) & then does some basic logic as we don’t need our own input displayed back to us but generally have a particular biz task in mind.
I hope my frustration has not painted this community with too harsh a brush, but this is not the 1st time that I have tried to use a freeware coding language and get stumped each time as I always try to use it for a work task and not something for interests sake on a home desktop.
MikeD
Hello Mike,
we are aware that we had issues on Tuesday and Wednesday with the server availability for downlaoding DB2 Express. Since yesterday morning 11:30am EST we have not seen any issues and very good download success rate across the globe (record holder is a gentleman from Austria with 2:25 minutes, slowest is a download from AsiaPAcific with 52 minutes).
We monitor very closely right now the quality of service and we got so far only positive feedback in the DB2 Express-C forum (check [link]) for details.
Cheers,
Boris Bialek
IBM DB2 Toronto Lab
Hi Boris - ta for the headsup - I kinda knew the site would get hammered and after our meet, IBM kindly fedex’d a cd copy for us.
Ciao
MikeD
Feedback:
I folded to corp pressure and had to take on Perl to produce a few scripts. For someone from the old mainframe coding school, working the past 6 years with BI tools,server and rdbms technologies, I definitely do not like Perl or the attitude of the ppl that use it. And that’s an unbiased opinion as I do not use java, C, python, ruby, lisp etc
Having said that, I now intend re-visiting Ruby for the following reasons:
It looks ‘cleaner’ and for someone who only needs to code something every once in a while, it’s more productive to not have to fiddle with syntax or extensive libraries.
Ruby also seems to have an aura of new found energy around it and the ppl using it, so information is still being shared with enthusiasm, without the usual ‘not another n00b’ attitude prevalent in many of the more established languages.
The only reason I managed to accomplish my objectives in Perl was due to IBM’s examples which I pulled apart and put together with a ‘lets see what happens if i do this’ method. i.e. I still do not understand why subroutines cannot pass data streams back & forth or how the DB2 utility that I call works.
My original problem with Ruby was having to use something totally foreign - makefile - which in itself was not a ruby problem, but a lack of basic understanding on my part. The perl exe i found was ‘a click and run’ solution, but i think i have a better idea as to what I now have to do with Ruby.
Hopefully i will manage to connect to DB2 UDB and will then post what i did so as to help anyone else in the same predicament.
MikeD