IBM UniVerse database adapter for ActiveRecord?

I’m facing a situation where I am going to have to integrate with a
legacy database , specifically the IBM UniVerse database, which is not
quite relational. It feels like a holdover from the dark ages of

Before I attempt writing an ActiveRecord adapter, I’d like to know if
anyone else uses this database and if I’m the only person that needs
this thing. I could integrate by writing a Java web service, but I
prefer to keep it all in Rails.

Let’s see if this gets any responses …

– G.

Perhaps running under JRuby would be an option since you’ve got a
scenario? We have an ActiveRecord to JDBC adapter working already which
we’re currently using on MySQL for demo apps. If there’s a JDBC driver
available, it might not require much to hook in your UniVerse.

Thanks for the reply. There is a JDBC driver available for UniVerse,
though I haven’t been able to get my hands on it yet. Another option
is to do screen scraping under telnet but I’m not crazy about that

I’m willing to split off the whole application to isolate the
ActiveRecord parts (and a web service API) into JRuby and use the web
service to get the real app server talking to the JRuby portion.

Are ActiveRecord and ActionWebService working well under JRuby? I
don’t care about the rest of Rails, just those two pieces working
from within a controller will be OK for me.

Some background. I’m fetching a bank account balance to supply to a
RoR app that will use Asterisk and a text to speech engine to speak
that balance back to the user, so performance wise, it has to happen
during the phone call. Performance is not too much of a problem for
me, since I’m fetching only one record at a time on demand. One extra
second won’t kill me :slight_smile: But it needs to work each time, no crashes.

I’ll take a look at the ActiveRecord -> JDBC bridge. Again, thanks!!!

– G.

The JDBC stuff is not yet in CVS, but it oughta be in there soon. It’s
we did to get a simple rails app working, and it’s just gotten to the
of usability in the past couple days. However, it’s very promising…and
really want to get it out to others to test out additional drivers and
deployment scenarios. We’ve also got a major JRuby release coming out
soon that will move things along tremendously.

We’re at JavaOne next week, but jump on the JRuby mailing lists and
wee if we can get you a snapshot of the current code.

Forgot to ask. What release of JRuby to go for? Is CVS HEAD in good
working condition? Or I should go for something else?

– G.

I’ve checked out CVS HEAD and managed to install rails via gems using
it. I had to make some change to the File class and in a couple of
other places, but it’s getting to the point where it will work soon.

I think it’s still too slow now. Not the sort of thing I can bank on
at this point. But we knew that already, didn’t we? :slight_smile: I’ll keep on
investigating …

– G.

Why do you need to use ActiveRecod to read the data from Universe? I
think your web service idea sounds better, and simpler, as all you need
is the balance returning to rails.

I have previously used the UniObjects for Java API to talk to UniData
(very similar to Universe and also from IBM).

This doesn’t use JDBC, it uses the Pick/UniData/UniVerse style nested
data structure.

To use JDBC with UniData was a pain. I had to create a seperate table
that held the SQL ‘view’ of the nested UniData table.

The manual for UniObjects for Java is here:

You could build a Java DAO using UniObjects for Java and expose this
using a web service to rails.

You might find more info here.

This folowing link also says about exposing UniVerse data as a web

Let me know how you get on.


Thanks for giving it a shot. In some scenarios, JRuby is still a little
slow, but it’s improving very quickly. At any rate, it sounds like the
option for UniVerse isn’t the greatest choice in the first place, and
more specific APIs will be a better bet for you.

BTW, if you have a patch for any of JRuby code, please send it along.
weren’t working when I last tried them, but that was several weeks ago
before our last Rails push. If they’re working now, all the better!

I think I agree. The simplest way out is to use the web services as
glue between the two components. I’ve gotten JRuby working in a very
basic way, but it is likely to be too slow to handle the transaction
while keeping someone waiting on the line …

I’m looking at the UniObjects API as well as the C call level API. I
didn’t know about creating the separate table issue. I don’t think
that I will be able to do that on a production database that is very
critical to the organization …

– G.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs