scripting language (fwd)

A

Ara.T.Howard

got this from a friend... any thoughts?

-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it.
| --Dogen
===============================================================================

---------- Forwarded message ----------
Date: Thu, 15 Jul 2004 09:33:35 -0700 (PDT)
To: Ara.T.Howard <[email protected]>
Subject: scripting language

Hey A-

I'm investigating alternative scripting languages. We
currently use Perl almost exclusively (except
sometimes some ksh) but would like to consider a
language that is friendlier with the JVM. It also has
to have an LDAP API and an Oracle API, without
requiring C coding (we don't have C coders here).

My first task is to write a trivial script that
selects one row from an Oracle database. I installed
ruby for windows. I downloaded & installed ruby DBD,
which says it requires ruby OCI, which doesn't come in
binary form (i.e. requires me to compile it with a c
compiler, which I don't have on my windows box).

That's probably more rigamarole than several of these
other languages require. And the libraries themselves
seem to be mostly alpha software with the last update
sometime in 2003.

I'm struck by the elegance of ruby and I'd really like
to try and make it work, but am having a hard time
fitting it into the production realities of our shop.
I'm getting the impression that a C shop could really
take the language and run with it, but a
cobol/SQL/java shop like ours may be out of luck. Do
you have any encouraging words/links before I move on?

J
 
B

Ben Giddings

Ara.T.Howard said:
I'm investigating alternative scripting languages. We
currently use Perl almost exclusively (except
sometimes some ksh) but would like to consider a
language that is friendlier with the JVM. It also has
to have an LDAP API and an Oracle API, without
requiring C coding (we don't have C coders here).

Well, first of all, he should take a look at zsh if they use ksh. ;)

Secondly, it seems a bit odd to me that a cobol/SQL/Java shop wouldn't
even be able to compile C code. I assume there's no programming in
getting the Ruby OCI to work, just compiling. I suppose if they're on
Windows instead of Linux, OS X or a BSD then they might not have a C
compiler handy. *shrug*

I guess it's common for Windows packages to be distributed as compiled
binaries, but from a brief glance, this Ruby OCI interface seems to be
geared more towards Unixish users (it's distributed as a tar.gz file).

Maybe Ruby just isn't what they need, but I would bet that it wouldn't
be too hard to find a kind soul to compile the API for them if they
don't want to bother with installing a compiler.

Ben
 
M

Michael Geary

Ara.T.Howard said:
got this from a friend... any thoughts?

Hey A-

I'm investigating alternative scripting languages. We
currently use Perl almost exclusively (except
sometimes some ksh) but would like to consider a
language that is friendlier with the JVM. It also has
to have an LDAP API and an Oracle API, without
requiring C coding (we don't have C coders here).

I hesitate to suggest a language other than Ruby, but if they want something
that's friendly with the JVM, I wonder if they should be looking at Groovy?

http://groovy.codehaus.org/
http://groovy.codehaus.org/Language+Guide

-Mike
 
J

Jamis Buck

Ara.T.Howard said:
got this from a friend... any thoughts?

-a
--
===============================================================================

| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it. | --Dogen
===============================================================================


---------- Forwarded message ----------
Date: Thu, 15 Jul 2004 09:33:35 -0700 (PDT)
To: Ara.T.Howard <[email protected]>
Subject: scripting language

Hey A-

I'm investigating alternative scripting languages. We
currently use Perl almost exclusively (except
sometimes some ksh) but would like to consider a
language that is friendlier with the JVM. It also has
to have an LDAP API and an Oracle API, without
requiring C coding (we don't have C coders here).

My first task is to write a trivial script that
selects one row from an Oracle database. I installed
ruby for windows. I downloaded & installed ruby DBD,
which says it requires ruby OCI, which doesn't come in
binary form (i.e. requires me to compile it with a c
compiler, which I don't have on my windows box).

That's probably more rigamarole than several of these
other languages require. And the libraries themselves
seem to be mostly alpha software with the last update
sometime in 2003.

I'm struck by the elegance of ruby and I'd really like
to try and make it work, but am having a hard time
fitting it into the production realities of our shop.
I'm getting the impression that a C shop could really
take the language and run with it, but a
cobol/SQL/java shop like ours may be out of luck. Do
you have any encouraging words/links before I move on?

Has anyone ever reverse-engineered a network protocol before? It would
certainly be nice to have a "pure-ruby" driver for Oracle, so that it
could be used right out of the box on any platform, like the thin JDBC
drivers for Oracle.

I took a glance at some of the packets exchanged with our Oracle db here
and it looks like it might not be too difficult to come up with... but
then again, I'm probably hopelessly naive on this score, having never
even attempted to reverse engineer a protocol before. In fact, I don't
even know what the legal issues surrounding this would be.

I just think it would be slick. :)

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
C

Carl Youngblood

Isn't there source code for the oci oracle protocol out there? A lot
of open source projects have that option. I'm thinking of PHP. You
might want to look at the source before you try reverse-engineering
anything.

Ara.T.Howard said:
got this from a friend... any thoughts?

-a
--
===============================================================================

| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it. | --Dogen
===============================================================================


---------- Forwarded message ----------
Date: Thu, 15 Jul 2004 09:33:35 -0700 (PDT)
To: Ara.T.Howard <[email protected]>
Subject: scripting language

Hey A-

I'm investigating alternative scripting languages. We
currently use Perl almost exclusively (except
sometimes some ksh) but would like to consider a
language that is friendlier with the JVM. It also has
to have an LDAP API and an Oracle API, without
requiring C coding (we don't have C coders here).

My first task is to write a trivial script that
selects one row from an Oracle database. I installed
ruby for windows. I downloaded & installed ruby DBD,
which says it requires ruby OCI, which doesn't come in
binary form (i.e. requires me to compile it with a c
compiler, which I don't have on my windows box).

That's probably more rigamarole than several of these
other languages require. And the libraries themselves
seem to be mostly alpha software with the last update
sometime in 2003.

I'm struck by the elegance of ruby and I'd really like
to try and make it work, but am having a hard time
fitting it into the production realities of our shop.
I'm getting the impression that a C shop could really
take the language and run with it, but a
cobol/SQL/java shop like ours may be out of luck. Do
you have any encouraging words/links before I move on?

Has anyone ever reverse-engineered a network protocol before? It would
certainly be nice to have a "pure-ruby" driver for Oracle, so that it
could be used right out of the box on any platform, like the thin JDBC
drivers for Oracle.

I took a glance at some of the packets exchanged with our Oracle db here
and it looks like it might not be too difficult to come up with... but
then again, I'm probably hopelessly naive on this score, having never
even attempted to reverse engineer a protocol before. In fact, I don't
even know what the legal issues surrounding this would be.

I just think it would be slick. :)

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
J

Jamis Buck

Carl said:
Isn't there source code for the oci oracle protocol out there? A lot
of open source projects have that option. I'm thinking of PHP. You
might want to look at the source before you try reverse-engineering
anything.

Well, looking at the OCI stuff in PHP, it looks like it relies on the
Oracle client being installed as well. It then makes API calls into the
Oracle client libraries to connect to and query the database.

What I would like is to remove the Oracle client as a dependency, just
as the Oracle JDBC (thin) client does. The thin (as opposed to the oci)
Oracle JDBC client implements in pure Java the network protocols that
communicate with the Oracle database server.

This means that the thin client will ultimately be less responsive than
the oci client, but its GREAT for working on your own machine.

I'm hoping that something like this can be written for Ruby, in Ruby,
without the need to create an extension module in C to bridge into the
Oracle OCI stuff (which is what the current ruby oracle module does).

I'm not volunteering to write it--I've got too much on my plate
already--I was just wondering if anyone else has thought about doing this.

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
A

Austin Ziegler

Well, looking at the OCI stuff in PHP, it looks like it relies on the
Oracle client being installed as well. It then makes API calls into the
Oracle client libraries to connect to and query the database.

What I would like is to remove the Oracle client as a dependency, just
as the Oracle JDBC (thin) client does. The thin (as opposed to the oci)
Oracle JDBC client implements in pure Java the network protocols that
communicate with the Oracle database server.

This means that the thin client will ultimately be less responsive than
the oci client, but its GREAT for working on your own machine.

I'm hoping that something like this can be written for Ruby, in Ruby,
without the need to create an extension module in C to bridge into the
Oracle OCI stuff (which is what the current ruby oracle module does).

I'm not volunteering to write it--I've got too much on my plate
already--I was just wondering if anyone else has thought about doing this.

I don't do any direct work with Oracle anymore; if I were to do so, I
might look at reverse engineering this -- but I also spent the last
little while to see if anyone has come up with an open source Oracle
thin driver; it appears not.

-austin
 
R

Randy Lawrence

Austin said:
I don't do any direct work with Oracle anymore; if I were to do so, I
might look at reverse engineering this -- but I also spent the last
little while to see if anyone has come up with an open source Oracle
thin driver; it appears not.

-austin

Are there dynamic libraries that do this? If the API is documented,
maybe its just a matter of creating Ruby wrappers using ext/dl or swig.
 
J

Jamis Buck

Randy said:
Are there dynamic libraries that do this? If the API is documented,
maybe its just a matter of creating Ruby wrappers using ext/dl or swig.

That's just the thing... in order to use the API, you have to have the
oracle client installed. What if you don't have access to the oracle
client? What if you don't want to install it? It is, after all, quite
large. What if (*gasp*) you're using an OS that isn't supported by the
oracle client?

What I am referring to is a pure Ruby client that communicates via TCP
with the Oracle database server, wherever it may be.

There are already ruby modules that communicate with oracle via its API.
The problem is that the OP doesn't have access to a compiler and the
oracle modules aren't distributed in binary form. :( Thus, a pure Ruby
solution would (IMO) be desirable.

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
G

Gavin Sinclair

What I would like is to remove the Oracle client as a dependency, just
as the Oracle JDBC (thin) client does. The thin (as opposed to the oci)
Oracle JDBC client implements in pure Java the network protocols that
communicate with the Oracle database server.
This means that the thin client will ultimately be less responsive than
the oci client, but its GREAT for working on your own machine.
I'm hoping that something like this can be written for Ruby, in Ruby,
without the need to create an extension module in C to bridge into the
Oracle OCI stuff (which is what the current ruby oracle module does).

Couldn't the thin client be written in C and then wrapped in every
scripting language imaginable? If so, *is* there an Oracle thin
client library written in C already?

Gavin
 
J

Jamis Buck

Gavin said:
Couldn't the thin client be written in C and then wrapped in every
scripting language imaginable? If so, *is* there an Oracle thin
client library written in C already?

Gavin

The client *could*, of course be written in C. To my knowledge, such an
implementation does not exist. (Might be a neat project, in fact.)

However, that still doesn't address the OP's original concern: lack of a
compiler made a C extension impractical. A *pure Ruby* implementation
would still be most convenient, though not as efficient.

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
L

Lennon Day-Reynolds

This may sound heretical on a Ruby mailing list, but it sounds like
what they need is *not* Ruby. If they're a Java shop, and are using
backends (Oracle, LDAP) which are already well-supported on the Java
platform, it seems like investing heavily in a C-based language
runtime probably won't be in their best interests.

I second the earlier recommendation to consider Groovy, and think
JRuby could work as well.

Lennon
 
C

Carl Youngblood

I bet that ethereal would come in handy for reverse engineering the
protocol. Just set it up to capture the network traffic, run a bunch
of queries on a machine that has the client installed and then dump
the traffic to a file for detailed analysis.
 
R

Robert Klemme

Gavin Sinclair said:
Couldn't the thin client be written in C and then wrapped in every
scripting language imaginable? If so, *is* there an Oracle thin
client library written in C already?

AFAIK there is a lib containing the OCI code (pure C). So IMHO it should
be feasible to build a shared lib for each platform supported by Oracle
and link Oracle's code in.

Then there's still the legal issue. I figure Oracle could be grateful for
each added language with built in Oracle support.

But I may be wrong.

robert
 
J

Jamis Buck

Carl said:
I bet that ethereal would come in handy for reverse engineering the
protocol. Just set it up to capture the network traffic, run a bunch
of queries on a machine that has the client installed and then dump
the traffic to a file for detailed analysis.

It is VERY handy. ;) I used it a little bit yesterday to get an idea of
how the TNS requests and responses were formatted.

The hard part (as I see it, being a newbie in this area) is decyphering
the data portions of each packet. *sigh*

I need to stop responding to this thread... I've got too many projects
already, and this is tempting me too much... ;)

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
K

Kent Sibilev

Long time ago I wrote a oracle client module using Ruby/DL which
connected to oracle via Oracle OCI API. There was also a DBD wrapper
for this module, so I could use it via DBI interface. So if you do not
have a compiler installed but you have Oracle client installed, you can
use this module. At that time I tested it only on my WinXP box, and
since this is the pure ruby module there are some performance drawbacks
as well.

URL: http://rubyist.homeunix.net/rubyoci-0.1.tar.gz

Cheers,
Kent.
 
R

Ron Stephens

Lennon Day-Reynolds said:
This may sound heretical on a Ruby mailing list, but it sounds like
what they need is *not* Ruby. If they're a Java shop, and are using
backends (Oracle, LDAP) which are already well-supported on the Java
platform, it seems like investing heavily in a C-based language
runtime probably won't be in their best interests.

I second the earlier recommendation to consider Groovy, and think
JRuby could work as well.

Lennon

I'd suggest taking a look at jython.

Ron Stephens
http://www.awaretek.com/plf.html
 
A

Alexey Verkhovsky

I'd suggest taking a look at jython.

About a month ago I have evaluated all three JVM scripting languages
mentioned so far (Jruby, Groovy, Jython) to use for unit testing of our
production Java code.

In the end, Jython looked like the only thing that could be considered
for serious work, and even that with caveats. Finally, I concluded to
stay with the plain old Java.

Groovy was very far from what I would consider "usable" at that time
(plenty of interesting bugs, 10 times slower than Jython, core language
syntax not stabilized).

Jruby looked better, but lagged two versions behind the parent language,
and therefore could not run many Ruby apps. E.g., try to build rake with
it.

So, my 2 cents worth of advice to any established Java shop would be: go
for Jython, or stay where you are (plain Java).

Best regards,
Alexey Verkhovsky
 
G

gabriele renzi

Jruby looked better, but lagged two versions behind the parent language,
and therefore could not run many Ruby apps. E.g., try to build rake with
it.

what do you mean by 'lagged two versions' ?
The latest versione should be nearly 1.8 compliant, IIRC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top