The CTO came to me with a problem last week -- he needed a way to access an SQLIte database on a remote server. The challenge is that SQLite works locally only.

He did mention a solution called SQL Relay on SourceForge that we could use. So I downloaded it and tried to build it.

You may have heard this story before -- it said before it could go any further, it needed Rudiments, so I downloaded that as well, and tried to build it, but it just complained that '... no combination of networking libraries was found.' when I ran configure.

I'm kind of a persistent guy, so I tried to dig through the configure.sh file, and quickly got lost in the 34,425 lines and 986K of the script. No, I'm not kidding -- go download it and see for yourself. It's a monster.

I got onto #perl and asked about SQL Relay and Rudiments, but couldn't get any useful responses (hey, it's IRC).

So anyway, on Friday I wrote to the author, asking about which 'networking libraries' Rudiments might need. I'm on Fedora Core 6, which I imagine has mostly up to date stuff. (Update (the following Wednesday): I just heard back from David Muse, and he correctly diagnosed that my installation was missing g++. I have replied, suggesting that his configure script should die if the build can't continue without g++.)

Friday night, while I attended my sister-in-law's preview of her dance performances as part of Nuit Blanche, I turned the problem over and over in my head. I finally determined that the best solution would be to introduce the 'host' argument somewhere in the DBD::SQLite driver.

Sunday night, while catching up on some reading, I read Tim Bunce's excellent Advanced Talk on DBI, which talked about using DBI::ProxyServer and DBD::Proxy to achieve just that goal -- remotely accessing a database. Beautiful. And no spelunking in DBI for me.

So I tried putting that together yesterday, and today, and with a little help, got it working fine. The conclusion: Once again, CPAN, Perlmonks and the Open Source community comes through.

What else can I say? Thanks yet again.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re: CPAN, Perlmonks and the community. What a team.
by perrin (Chancellor) on Oct 02, 2007 at 19:21 UTC
    Glad to hear you got it working. You may also be interested in Tim's new DBI::Gofer work, which can be an improvement over DBI::ProxyServer for certain situations.

      Thanks, and I also found Changes to DBI which tells me that version 1.54 (two ahead of what I currently have) introduces DBD::Gofer.

      And having just read all about DBD::Gofer, I'm impressed -- it packages up the connect, the prepare, the bind and the execute statements into a single lump, which is brilliant. The bind, of course, means there's no fetch method necessary. More brilliance.

      Very nice.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re: CPAN, Perlmonks and the community. What a team.
by Gavin (Archbishop) on Oct 03, 2007 at 09:43 UTC
    It’s the combination of solid engineering practices.

    CPAN + PerlMonks + Rocks!