From: Phillip Gawlowski Date: 2008-04-16T23:39:31+09:00 Subject: Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thomas Kellerer wrote: | The Postgres JDBC driver is 100% Java and definitely does not rely on | any external DLLs or libraries, it speaks the native PG protocol (AFAIK | there is no such thing as a "Java interface"). So why shouldn't this be | possible with Ruby as well? Because Ruby doesn't really compare to Java in terms of infrastructure and APIs? Both Ruby and the database you want to speak to have to provide an API to do that (JDBC is a Java API, and still needs the proper connectors to actually talk to the database, similar to ODBC). It is not yet possible with Ruby (except via Ruby/DL, I've heard), but it certainly could be. So, up to trying to do something like that? ;P At the moment, you have to hook into C somehow, or wrap a C/C++ extension to pull that off. Which is certainly possible, as the various DB-gems show. However, since Ruby has no ready-made API for hooking up DB connectors and all that stuff, the job has be done over and over again, for each DB Ruby shall support. And, IMO, adding such an API, while nice, would be beyond Ruby's scope. And JRuby needs the JDBC libraries of, for example, MySQL to talk to a MySQL server. Those aren't part of Java's distribution. :| But the relative ease of installation makes JRuby very, very attractive to me when deploying Rails apps. Well, MySQL might become shipped as a standard, since Sun bought out MySQL, but you never know.. Long story short: It's not impossible to define a standard API for Ruby, but somebody has to do it yet (don't look at me, C makes me scream). - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan ~ - You know you've been hacking too long when... ...you want to retract something said in haste, and think C-a C-@ C-e C-w -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgGD48ACgkQbtAgaoJTgL+OmQCfbLO5l8x0cw+HhH8C6RClJ7VR SWkAmwX2UxbzdJgNM25SOhEuB+OWDeC1 =4UzI -----END PGP SIGNATURE-----