Jonathan has asked for the wisdom of the Perl Monks concerning the following question:

Currently I run an intranet site using Apache/mod_perl and Apache::Registry. The other developers all want to use jsp's instead.

This is a good idea isn't it?

What is the mod_perl case?

(BTW anyone know of any comparative performance sources?)

Replies are listed 'Best First'.
Re: Don't use CGI;
by tinman (Curate) on Apr 17, 2001 at 12:34 UTC

    This is one benchmark.. somewhat dated, but good for a general idea.

    You might also find this article to be interesting too...

    By and large, I've found that JSPs can be as fast as mod_perl, (Note: JSP have to play catchup to equal mod_perl performance, with a specialized JRE like IBM, and lots of other trickery besides) but the usual disclaimer applies, it depends a lot on what you're doing with mod_perl and JSPs, so these benchmarks should be taken with a more than a few grains of salt.. :o)

    CGI is slower because of the overhead of starting up an interpreter for each invocation of the script, and all of these benchmarks seem to prove this.. so, yes, for the most part, mod_perl over CGI is true where performance is concerned...

    As in a recent thread though, I'd prefer mod_perl (and Perl in general) over JSP (and Java) for an entirely different set of reasons.. YMMV :o)
    HTH

      Says tinman:
      This is one benchmark
      Thanks a lot for the reference. I had not seen that before.

      The thing I found really striking about that page is how deceptive it is. The various platforms are ordered by raw hits per second, and so mod_perl comes in second place. But if you don't look carefully, you won't notice that mod_perl was running on a PIII-500, and the JSP/Java test was running on a P266.

      --
      Mark Dominus
      Perl Paraphernalia

      Thanks tinman using mod_perl/Apache::Registry enables you to forego the cost of re-compiling the scripts on each evocation, but I wasn't aware of JSP's strength.
      I'd prefer to use Perl as I know it a lot better but I'm not going to do a Canute if the tide has turned.
Re: Don't use CGI;
by arturo (Vicar) on Apr 17, 2001 at 16:44 UTC

    mod_perl is a heckuva lot more than a dynamic website speedup hack. It gives you hooks into every phase of the Apache request lifecycle (authentication, URI translation, content, etc. etc. etc.), which offers you ludicrous amounts of power. I don't think any JSP engine gives you all that, either a standalone JSP-type server (I've used the Apache project's Tomcat engine in this capacity a bit) or one that's embedded into Apache w/mod_jserv.

    So if these hooks into Apache are something you'd like to have in your toolkit, mod_perl seems to be ahead on this.

    (Any of those more familiar with Tomcat etc. feel free to correct me on this point, I'm interested too).

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor

      I agree aturo but while I like having access to the Apache API I only use it for access control. The JSP engine doesn't give you any such control.
Re: Don't use CGI;
by Jouke (Curate) on Apr 17, 2001 at 12:33 UTC
    What exactly is your question? Do you want to know if we think using jsp's is a good idea?
    I think there's nothing wrong with using Apache with mod_perl, but if you're the only one using it in your company, it may be hard to keep developing your intranet-stuff, while everyone else uses jsp...

    Please be more exact in the future when asking questions...

    Jouke Visser, Perl 'Adept'
    A reply falls below the community's threshold of quality. You may see it by logging in.