Alternative to perl_access and python_access?

Felix E. Klee felix.klee at inka.de
Fri Jun 10 11:36:54 UTC 2005


For controlling news group access, I'd like INN to use a custom program,
but not one executed with perl_access of python_access (for more
details, read below).  What options do I have?

The reason is that I want to make use of a connection to a PostgreSQL
that stays persistent even after an nnrpd process is closed.  This can
be achieved simply by using the "SpeedyCGI" Perl interpreter extension
and "DBI::connect_cached".

Why do I want such a connection?  Well, we're running NewsPortal as a
web based news reader and it opens a new connection to INN for almost
every request (retrieving an article, getting a list of articles, etc.).
Each connection involves a lengthy authentication process were
establishing the database connection takes up most of the time.

An alternative to using a persistent database connection would be
modifying NewsPortal to use a persistent connection to INN.  This could
be realized e.g. by using PHP's "pfsockopen" instead of "fsockopen"
which, however, is problematic as well since not every HTTP request will
be answered by the same Apache process (Apache's KeepAlive is not a
reliable solution - I've played with it already).  So one would have to
turn to a daemon that maintains persistent connections, and then it gets
quite complicated ...

-- 
Felix E. Klee


More information about the inn-workers mailing list