[Koha] Very small library, low-end hardware
Christopher Hicks
chicks at chicks.net
Sat Sep 6 01:37:03 NZST 2003
Librarianss without a technical bent are probably already ignoring all of
my e-mails anyway, but if you're still around feel free to skip the rest
of this one and stock your library with Perl and O'Reilly books! :)
On 6 Sep 2003, Rich Churcher wrote:
> On Fri, 2003-09-05 at 01:04, Christopher Hicks wrote:
> > > I suspect that starting up perl, and making database connections
> > > are 2 of the bottlenecks.
> >
> > Oh yes. Even MySQL takes a significant time to setup a
> > database connection compared to the rest of the perl script.
>
> Remembering I'm coming in cold on this, but--is there any benefit
> to be had from using persistant db connections? Just curious.
There are several clear benefits in doing so. Primarily it allows the
databse server and the web server to spend their time doing "real" work
instead of continuously re-establishing connections. In practice this is
so helpful that there's a standard official mod_perl module to do it -
Apache::DBI. Numerous expensive big name products and a few other open
source projects provide similar functionality for other operating
environments.
> Regarding the Apache dependency issue, it seems that one might be able
> to achieve a loose coupling to the server (ie. have mod_perl as an
> option, rather than a requirement).
mod_perl should only ever be an option. Having CGI to test and develop
with is too handy to lose IMHO.
> Though I suppose that splits the development effort somewhat. Once
> again, an entirely uninformed comment!
It really doesn't split effort much at all. The wrapper scripts and glue
code we use to have sites work in either mode are less than 70 lines of
total code. Beyond that everything is the truly the same. Writing code
that works in both does require some extra testing, but once you get in
the habit of writing in strict and otherwise being a good mod_perl
programmer it doesn't really take much thought to deal with any mod_perl
vs. CGI issues. The mod_perl guide maintained by Stas Bekman and a roving
band of mod_perlers on http://perl.apache.org/ does a very good job of
illucidating the issues that are important to not lose sight of.
--
</chris>
No, no, you're not thinking, you're just being logical.
-Niels Bohr, physicist (1885-1962)
More information about the Koha
mailing list