At 10:24 AM 12/13/00 -0300, jleidigh wrote:
>I have written a awsome mod_perl module for Apache and
>now my companie wants to transform it to Java (ik).
Why would your company want to redevelop something from scratch in another
language instead of making use of the product they have now that works?
That seems really odd to be in a company that wishes to reinvent the wheel?
>Nothing personal against java but 95% of the program is
>regular expressions. Perl is king in this area. In
>java they are using Oroinc 3rd party classes for the
>regexs. With some prliminary bench mark test of non
>mod_perl perl and Java, perl won being 12-20 times
>faster. But now they want to do super tuning and also
>compare Resource consumption between JRun/Java Servlets
>and Apache/mod_perl. My main concern is the fact that
>apache/mod_perl child proccess can be as big as 12 MB.
>Specifically my question is....
>
>1. Is there a way to make mod_perl multi-threaded?
Yes, but not for the benefits you want. It doesn't matter if Perl is
multi-threaded because two things lag behind -- Apache 2.0 as a
multithreaded partner and CPAN modules that are within-Perl thread-safe.
The first will happen given time, the 2nd is a problem that may never be
solved (at least not for a year or two).
>2. Is there a way to lower this memory consumtion?
Some but not really that much other than being intelligent about
preloading. Apache 2.0/mod_perl 2.0 models are supposed to be hooking into
future versions of Perl to separate CODE and DATA segments within Perl
itself. Right now Perl P-Code is mixed within data in Perl, so
copy-on-write slowly degrades when it doesn't have to.
>3. Is there a way to precomplie perl to machine code to
>better perfomance? They are planning to do the same for
>Java and may gain performance.
Not really unless you are talking about not using mod_perl. I don't know of
any servlet engines that exist that can load machine code compiled servlets
though. I know TowerJ and products like that, but they compile an entire
Java application, which doesn't fit well in the dynamically loadable apps.
I think when you compile a Java app there is a possibility you may lose
some capability of integrating with existing Java classes....I think a
similar thing holds true for compiling perl to machine code -- I am not
sure if its ever gone beyond beta stage technology on Perl though.
Anyway, we know that Java is better at some things. So I think its been
said here before... Time to market may be an issue for your company. Can
your company realistically afford to play with Java and do they really need
those features you mentioned.
Also, Java servlets is an app development technology. Mod_perl is MORE than
that. But perhaps your company doesn't need that side of mod_perl.
Anyway, Good Luck.
Later,
Gunther