I have exhausted my ability to find answers on the web for this one. I'm trying to install mod_perl on windows and there are many dead ends.
Is mod_perl even what I'm looking for?***
I have a collection of web apps used within my company's local network for database and file system interface. The web server runs Apache 2.2 and ActivePerl 5.16 using
DBI
,DBD::mysql
, andCGI
. The clients get their dynamic content via AJAX calls (jQuery.getJSON
) to the Perl scripts using CGI parameters. The traffic is extremely light - only 4 or so users and only a few queries at a time here and there.The issue I'm having is that the latency is unacceptable for the nature of these apps. The delay is typically around 400ms, all waiting time. I have experimented with increasingly simplistic Perl scripts and believe all of the delay is the Perl interpreter. I've looked into FastCGI but as I understand this deals mostly with high traffic which is not my problem: it's the overhead of each low-traffic call. So it seems like an Apache-embedded Perl interpreter (as I understand mod_perl to be) would solve my overhead-related latency issues.
How do you install it in a post Randy Kobes world?
All resources I've found for installing mod_perl for my setup involve a server
theory5x.uwinnipeg.ca
formerly run by him and now defunct after his passing. ActivePerl ppm does not have any mod_perl built in packages and the website shows all build failed listings.
Here is an ActiveState community post explaining why there is no ppm.
I did find this resource that seems to have all the missing pieces but for Strawberry Perl.
So I'm left to think the only way to do this is to install from source, but I have no understanding of how to do this. I have zero familiarity with Linux and it seems like most of this stuff is geared toward it. Worse yet I have a 64-bit Windows XP and a Windows Server to install it on.
The other thing that crossed my mind is maybe I need to install some kind of distribution like XAMPP instead of putting together all the pieces myself. I'd be quite nervous to change course now and risk breaking my working but slow apps
It's been an eternity since I've installed mod_perl on Windows so I'm not sure I can help you with that.
But your understanding that FastCGI "deals mostly with high traffic" is not correct. Both FastCGI and mod_perl will offer very similar performance benefits, because both will execute your scripts with a persistent interpreter–eliminating the overhead of starting up perl and compiling your code on each request. Therefore, there is no reason not to give FastCGI a shot.
You might want to look at the PSGI/Plack API which allows you to write code agnostically that can run under vanilla CGI, FastCGI, mod_perl, or with a PSGI-aware server such as Starman, or uwsgi. All of these except for vanilla CGI offer a persistent environment that will reduce the overhead of executing your scripts.