[cgiapp] Running a plain CGI::Application as FastCGI / PSGI
Ben Hitz
hitz at genome.stanford.edu
Thu May 13 11:38:06 EDT 2010
I don't think CGI::Application::FastCGI works. It's relatively
trivial to convert your controller script to Fast CGI.
It's basically this:
use CGI::Fast();
use MyCGI::Application::Class;
while(my $q = CGI::Fast->new) {
my $app = MyCGI::Application::Class->new(QUERY => $q)
);
$app->run;
}
Add any other parameters (template path, etc) to the constructor as
usual.
You have to be a little careful with how you handle your database
connections.
Ben
On May 13, 2010, at 12:55 AM, Cosimo Streppone wrote:
> Hi,
>
> I have a personal project running on plain CGI w/ CGI::App
> and it's been running fine, reasonably fast for what I need.
>
> The traffic is growing though, so I'd like to improve response time
> considerably. I have settled on 2 main options, FastCGI and PSGI.
>
> I think PSGI is my preferred option, but it would probably require
> more work? Maybe not...
>
> Regarding FastCGI, a quick search found me:
>
> 1) CGI::Fast, http://www.cgi-app.org/index.cgi?FastCGI
> requires more "conversion" work
>
> 2) CGI::Application::FastCGI,
> http://search.cpan.org/dist/CGI-Application-FastCGI/
> quite old, but less work to do?
>
> I will start playing with this stuff soon,
> but if you went through this already, I'd appreciate some
> guidance.
>
> --
> Cosimo
>
> ##### CGI::Application community mailing list ################
> ## ##
> ## To unsubscribe, or change your message delivery options, ##
> ## visit: http://lists.openlib.org/mailman/listinfo/cgiapp ##
> ## ##
> ## Web archive: http://lists.openlib.org/pipermail/cgiapp/ ##
> ## Wiki: http://cgiapp.erlbaum.net/ ##
> ## ##
> ################################################################
--
Ben Hitz
Senior Scientific Programmer ** Saccharomyces Genome Database ** GO
Consortium
Stanford University ** hitz at genome.stanford.edu
More information about the cgiapp
mailing list