Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: CGI or CGI::Fast

by sundialsvc4 (Abbot)
on Sep 10, 2012 at 04:05 UTC ( #992661=note: print w/replies, xml ) Need Help??


in reply to CGI or CGI::Fast

Many hosting services do offer FastCGI, and there are several ways that (e.g.) the Apache server can offer it, one of which appears to be distinctly tilted toward the needs of hosting companies.   The only way to know which options can be made available to you is, of course, to ask them directly.

I like to design web servers to use Plack, which gives the ability to choose which deployment strategy works best for you, and to change that strategy with little or no impact to your code.   Plack “abstracts away” such differences and does an excellent job of it.

Replies are listed 'Best First'.
Re^2: CGI or CGI::Fast
by Anonymous Monk on Sep 10, 2012 at 07:30 UTC

    I came across Plack while googling for FCGI, but have yet to read more about it. I've code that runs on Perl's CGI, and I naively thought that I could switch to CGI::Fast by just installing the module and FCGI - since both are listed as installed on the shared server. Apparently, however, it's not just these two modules but also the fastcgi engine, which is not available.

      Plack is, of course, an interface layer ... it provides a simple, consistent interface for you to write to, and then a set of personality-modules which you select according to the environment.   (One of those is, “ordinary CGI.”)   If your hosting service does not and cannot provide FastCGI, and the omission is business-important for you, just move to a different provider and change where your DNS entry goes. . .

      But remember that it might not actually matter.   Most operating systems are “lazy” about getting rid of recently-used code segments, in anticipation that the same programs are often used repeatedly.   (The notion of “locality of reference” also has a corollary with regard to which programs are being requested.)

        Thanks, sundialsvc4!

        It's shared hosting, which I think is the norm not to allow FastCGI.

        I could opt for the VPS, but that's substantially more expensive than shared hosting and isn't a viable option.

        I read up about Plack a little and found it to be quite abstract and I'm not immediately clear how it can help in my case - which is to move from ordinary CGI to faster CGI. Plack might not even be an option in a shared hosting environment, just like FastCGI.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992661]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-12-15 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (425 votes). Check out past polls.

    Notices?