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

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hello fellow Monks.

I've been thinking about this for a while - and after some time I posted it on Perl forum. Got some nice responses and a hint that I should post it here (after I refine it a little bit). So here I am.

Currently to create web applications with Perl, you have (mostly used) two options : mod_perl and mod_cgi

1. mod_perl - great, fast and beside requiring from you to be a good programmer isn't widely available (security problems mostly - some people point out higher memory usage). So you need some form of dedicated hosting (virtual private host an option too) to be able to run it.

2. mod_cgi - It has served us for years but it's getting quite old and what most people care for - it's slow.

[There are other things like Fast CGI, Apache::PerlRun and things like that, but they are even less available than mod_perl. Or run under mod_perl, so it's basicly same thing.]

What I thought that it would be a good thing is that we should get something between these two. Something that would be faster than mod_cgi, yet not as "complicated" as mod_perl. As you may know : "Sometimes, less is more!".

Ideally it would :

- intended for plain people, regular John Doe's who doesn't have money or knowledge to get an dedicated hosting.

- be able to run unaltered Perl/CGI code, even if it's bad style ...

- be part of Apache distribution. Actually it should replace mod_cgi if it can comply with previous

- be faster than mod_cgi by using some of the techniques of mod_perl, not necessarily as fast as mod_perl

That's about it. If anyone has something to add, I would like to hear it.

My idea :

- Embed Perl "inside" Apache so that it doesn't need to be reloaded on each request. It should help with the speed.

- Provide clean memory on each request, so that dirty CGI scripts would also run.

- Maybe cache things like precompiled application and such things. But then again it shouldn't cache too much things because then memory usage would rise.

My first thought when I saw Apache::PerlRun is to simply use it. But as it turns out, it's not so great. I mean, if it were so great, then Apache would be configured in such a way. That PerlRun would run all CGI scripts ...

I also wondered how PHP (I'm not sure if PHP under Apache runs only under mod_php or if there is another way) is doing it (faster than CGI - almost as fast as mod_perl but uses less memory)

Any ideas and/or comments are welcome.

PS. Please don't reply with comments about how mod_perl is great. I know! I know that it can do much more things than PHP - like Apache handlers and other things. Many replied with post like that on devshed, waisting their time to tell me something I already know. Just think that something faster than CGI, yet not as powerful as mod_perl is needed - something for the masses to use.

In reply to More than mod_cgi less than mod_perl. by techcode

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Discipulus]: i fear no
    [Discipulus]: i invented also 'gired'
    [Lady_Aleena]: Discipulus, then that is a problem. I wanted to find total seconds of my entire .mp3 collection to do some math on it to see how many days of continuous music i have.
    [LanX]: darn. .. I wanted to see Marine and Melonchon go to next round, just for fun xD
    [Discipulus]: LA use Perl: traversing a dir tree is simple; foreach file mp3 $sec+= use Mp3::Info
    [Lady_Aleena]: Discipulus, I was able to get the sum of the seconds on the command line using awk. Then I ran the result through a perl script and got the result. It came bach with 4 days, 9 hours, 56 minutes, 43 seconds.
    [Lady_Aleena]: s/bach/back/;
    [Discipulus]: gired anyway is the intermediate state between hired and fired (and vice versa;)
    [Lady_Aleena]: Discipuluis, I don't know if I want to fight with File::Find. File::Find and I are not friends.
    [Discipulus]: 4 day Bach is too muche even for me

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (9)
    As of 2017-04-23 20:32 GMT
    Find Nodes?
      Voting Booth?
      I'm a fool:

      Results (432 votes). Check out past polls.