On Saturday 12 June 2004 09:43 am, Lloyd Brown wrote:
> I haven't had too much experience with it, but it was my understanding
> that mod_perl wasn't exactly the most stable solution.  

Beep, wrong :)

> Since it's a
> multi threaded system, any slight instability will have a tendency to 
> crash the entire apache server, since threads share memory space, etc.

Mod_perl 2, which is a complete rewrite can use a multi-threaded system, since 
apache itself now can do that.  Claiming it's instable because it's 
multi-threaded is like saying linux or apache itself must be unstable for the 
same reason.  Not one I'm likely to believe.  Taking advantage of threads 
however is an option, based on how you compile your apache.

> Using perl as a cgi-bin (invoking the command-line perl interpreter)
> seems to be more common, 

Only because it's *really* old.  That's the original way to do it long before 
apache ruled the world, and we could turn it into an application server.  
However any system forking out into cgi world (being perl, php, C, java) has 
an enormous penalty, and is a bad idea for any real system.

> and since it's a multi processed system, the 
> processes don't share any memory space, etc with the parent process, and
> so an errant process will only be able to kill itself, not anybody
> else;  thus more stability. 

That is not a problem with threads, that would be a problem with your engine 
itself.  the exact same argument would apply equally to using mod_php.

> There's a performance advantage to using 
> threads, but at the cost of stability.  

Threads != instablility by nature.

> Perl wasn't really designed for 
> web scripting anyway.  Wasn't its main purpose the parsing of text log
> files?  

Yeah, about 20 years ago (well, parsing *text*, and unifying several other 
tools into a common kit), and wasnt' Java designed to power toasters and 
microwaves?  Language grow up when given time.  Besides, what is HTML (or 
xml), but text files... Hence the natural fit for working with html and xml.

> It does text processing much better than anything else I've seen 
> so far.
>
> I however, don't use perl unless I have to.  mod_php is supposed to be
> much more stable than mod_perl, and php is easier to learn, and doesn't
> sacrifice a significant amount of performance over perl, especially for
> web applications.

Supposed to?  how?  They are both plugins to Apache.  The only stabiltity 
issue you would see is if you are using the bleeding edge mod_perl 2 *beta*..  
And not the stable 1.x.  One of the biggest reasons to use mod_perl over 
mod_php when using apache modules, is because mod_perl hooks into the entire 
apache lifecycle.  You have direct access to use the entire apache API, 
making it a full blown application server, when tied with the well written 
frameworks and templating engines.  Mod_php is a content-handler, solely.  It 
isn't much more (although improving) than a embedded interpreter and a 
caching engine.  Therein lies some of the largest differences between the 
two.  As for easier to learn, php is *not* very different in appearance from 
perl, why, because that's where it started.

>
> Lloyd Brown
>
> (P.S.  This last paragraph is mostly opinion.  Please don't start any
> flame wars, 

Not flaming :)  just attempting to help inform.  Really, I am saying it 
politely, really...


-- 
--
Jayce^

Attachment: pgp064kdjFoZs.pgp
Description: signature

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to