Re: DESTROY not being called on stop/restart

2009-09-16 Thread Clinton Gormley
On Tue, 2009-09-15 at 14:29 -0500, David Nicol wrote: > I'm ignorant of internals specifics, but perl's full cleanup on exit > needs to be called, and is called at an orderly shutdown. It doesn't > get called at POSIX::exit, or when the process in which the > interpreter is embedded exits without c

mod_perl and Filter-Crypto

2009-09-16 Thread Jacek Pasternak
Hi everybody! I'm trying to use Filter-Crypto with mod_perl but with poor results. Everything works fine until I enable mod_perl. After this I'm getting errors like: "Unrecognized character \\x1F at ...". The line where it points is the begining of the encrypted part of file. Filter-Crypto change

Re: Why people not using mod_perl

2009-09-16 Thread Jeff Pang
On Tue, 30 Nov 2004 22:38:11 + modperl[at]att.net wrote: 3) capacity/scalable mod_perl is very scalable --- I mean, one can properly config a single server to handle dynamic content for 200K daily unique IPs. PHP may end up with just 100K and servlet ends up at around 50K. I'm just curio

Ways to scale a mod_perl site

2009-09-16 Thread Igor Chudov
My algebra.com server serves about 77k pageviews and a little over a million objects requests per day (with half of it being served in just 4 hours). I peak out at 35 requests per second currently. I use mod_perl, mysql, and perlbal with everything running on one server. The server has a solid st

Re: Ways to scale a mod_perl site

2009-09-16 Thread Michael Peters
On 09/16/2009 11:49 AM, Igor Chudov wrote: 1) Use a load balancer like perlbal (I am already doing that) A load balancer is good but so are proxies. If you can separate your application server from the server that servers static content then you'll get a boost even if they are on the same ma

Re: Ways to scale a mod_perl site

2009-09-16 Thread Igor Chudov
On Wed, Sep 16, 2009 at 11:05 AM, Michael Peters wrote: > On 09/16/2009 11:49 AM, Igor Chudov wrote: > > 1) Use a load balancer like perlbal (I am already doing that) >> > > A load balancer is good but so are proxies. If you can separate your > application server from the server that servers stat

Re: Ways to scale a mod_perl site

2009-09-16 Thread Igor Chudov
On Wed, Sep 16, 2009 at 11:15 AM, C. J. L. wrote > > I would buy a fast server with 4 or more cpu cores and the SSD or SAS > drives and run the backend db on a dedicated mysql instance. > By the way, guys, the performance difference between a regular SATA drive and a fast SAS drive is comparativ

Re: Ways to scale a mod_perl site

2009-09-16 Thread Adam Prime
Igor Chudov wrote: On Wed, Sep 16, 2009 at 11:05 AM, Michael Peters > wrote: On 09/16/2009 11:49 AM, Igor Chudov wrote: 1) Use a load balancer like perlbal (I am already doing that) A load balancer is good but so are proxies. If you can separat

Re: Ways to scale a mod_perl site

2009-09-16 Thread Igor Chudov
On Wed, Sep 16, 2009 at 11:48 AM, Adam Prime wrote: > Igor Chudov wrote >> >> >> I have very little static content. Even images are generated. My site >> generates images of math formulae such as (x-1)/(x+1) on the fly., >> > > I can understand generating them on the fly for flexibility reasons,

Re: Ways to scale a mod_perl site

2009-09-16 Thread Michael Peters
On 09/16/2009 12:13 PM, Brad Van Sickle wrote: Can I get you to explain this a little more? I don't see how this could be used for truly secure sites because I don't quite understand how storing a hash in a plain text cookie would be secure. If you need to store per-session data about a client

Re: Ways to scale a mod_perl site

2009-09-16 Thread Michael Peters
On 09/16/2009 12:48 PM, Adam Prime wrote: I have very little static content. Even images are generated. My site generates images of math formulae such as (x-1)/(x+1) on the fly., I can understand generating them on the fly for flexibility reasons, but I'd cache them, and serve them statically

Re: Ways to scale a mod_perl site

2009-09-16 Thread Michael Peters
On 09/16/2009 01:02 PM, Igor Chudov wrote: I actually do cache generated pictures, I store them in a database table called 'bincache'. This way I do not have to compute and draw every image on the fly. If I have a picture in bincache, I serve it, and if I do not, I generate it and save it. That

Re: Ways to scale a mod_perl site

2009-09-16 Thread Douglas Sims
I'm curious... what is the hardware like on the one server? How many CPUs and RAM? Also, a few thoughts... - You do a 301 from algebra.com to www.algebra.com. That doesn't take much work from the server, but why not just serve up everything from the original location? - The algebra problem I j

Re: Ways to scale a mod_perl site

2009-09-16 Thread Igor Chudov
Guys, I completely love this discussion about cookies. You have really enlightened me. I think that letting users store cookie info in a manner that is secure (involves both encryption and some form of authentication), instead of storing them in a table, could possibly result in a very substantial

Re: Ways to scale a mod_perl site

2009-09-16 Thread Igor Chudov
On Wed, Sep 16, 2009 at 12:21 PM, Douglas Sims wrote: > I'm curious... what is the hardware like on the one server? How many CPUs > and RAM? > > AMD Athlon quad core, running 32 bit Ubuntu Hardy. 16 GB of RAM. Algebra.Com data is stored on an SSD> > Also, a few thoughts... > > - You do a 301 f

Re: Ways to scale a mod_perl site

2009-09-16 Thread Perrin Harkins
On Wed, Sep 16, 2009 at 11:49 AM, Igor Chudov wrote: > Any thoughts? In addition to the good advice you're getting on the thread, here are some books you might find useful: - Practical mod_perl -- http://modperlbook.org/ -- is old, but has a lot of general architecture and tuning advice that rea

Re: Ways to scale a mod_perl site

2009-09-16 Thread Igor Chudov
Perrin, thanks a lot. I bought all books recommended below. Should be a good read. I want to be ready when the need arises, and I do not want to do anything stupid in the meantime that would make me not scalable. Again, thank you. Igor On Wed, Sep 16, 2009 at 1:12 PM, Perrin Harkins wrote: >

Re: Why people not using mod_perl

2009-09-16 Thread Perrin Harkins
On Wed, Sep 16, 2009 at 4:52 AM, Jeff Pang wrote: > I'm just curious, is this performance data still true in today? > We have a new project building a website for a goverment which should handle > lots of transportation data, servlet and modperl are two choices. I don't know what the source of th

Re: Ways to scale a mod_perl site

2009-09-16 Thread Scott Gifford
Igor Chudov writes: > My algebra.com server serves about 77k pageviews and a little over a million > objects requests per day (with half of it being served in just 4 hours). I > peak > out at 35 requests per second currently. Some high-level advice: Profile everything you can to see where your

Re: Why people not using mod_perl

2009-09-16 Thread Igor Chudov
My site algebra.com is about 80,000 lines of mod_perl code. I wrote a relatively large framework, with many homegrown perl modules, about five years ago. It uses a database, image generation modules, a big mathematical engine that I wrote (that "shows work", unlike popular third party packages), e

Re: Why people not using mod_perl

2009-09-16 Thread Fred Moyer
On Wed, Sep 16, 2009 at 2:30 PM, Igor Chudov wrote: > My site algebra.com is about 80,000 lines of mod_perl code. > > I wrote a relatively large framework, with many homegrown perl modules, > about five years ago. > It uses a database, image generation modules, a big mathematical engine that > I w

Re: Why people not using mod_perl

2009-09-16 Thread Phil Carmody
--- On Thu, 9/17/09, Igor Chudov wrote: > My site algebra.com is about 80,000 > lines of mod_perl code. > > I wrote a relatively large framework, with many homegrown > perl modules, about five years ago. > It uses a database, image generation modules, a big > mathematical engine that I wrote (th

Re: Why people not using mod_perl

2009-09-16 Thread Phil Carmody
It gets worse: """ Factor any number Find all factors of [305550321722429173] Solution by Factor any number 305550321722429173 is NOT a prime number: 305550321722429173 = 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 3 * 3 * 3 * 3 * 199 * 293 * 252718517 Work Shown 305550321722429173 is divisible by 2: 30555

Re: Why people not using mod_perl

2009-09-16 Thread Brad Van Sickle
This is a mod_perl list, so I would expect to see Perl championed pretty heavily, but Java, .net and there ilk are undoubtedly *the* choice for large web applications. I'd like to get into some discussion as to why almost all *large* sites choose these languages. I don't have any experienc

Re: Why people not using mod_perl

2009-09-16 Thread Jenn G.
On Thu, Sep 17, 2009 at 2:32 AM, Perrin Harkins wrote: > > I don't know what the source of that data was.  However, mod_perl is > basically just Perl, and Perl is very fast. I think the more exact statement should be, mod_perl is compiled perl, mod_perl is very fast. But perl CGI...I must say i

Re: Why people not using mod_perl

2009-09-16 Thread Perrin Harkins
On Wed, Sep 16, 2009 at 9:42 PM, Jenn G. wrote: > I think the more exact statement should be, mod_perl is compiled perl, > mod_perl is very fast. > But perl CGI...I must say it's very slow. Well, you can say CGI is slow, but Perl CGI is very fast compared to the alternatives. Have you ever tried

Re: Why people not using mod_perl

2009-09-16 Thread Jenn G.
On Thu, Sep 17, 2009 at 10:05 AM, Perrin Harkins wrote: > On Wed, Sep 16, 2009 at 9:42 PM, Jenn G. wrote: >> I think the more exact statement should be, mod_perl is compiled perl, >> mod_perl is very fast. >> But perl CGI...I must say it's very slow. > > Well, you can say CGI is slow, but Perl CG

Re: Why people not using mod_perl

2009-09-16 Thread Jeff Nokes
Doesn't Amazon run mod_perl/Mason? BTW, I agree with most of your points (would debate #4,5). I may substitute the phrase "More convenient" for "Easier" in #3. I would also add ... #7) How many engineers are available to hire that know or want to work with said technology? I built a gre

Re: Why people not using mod_perl

2009-09-16 Thread Perrin Harkins
On Wed, Sep 16, 2009 at 10:15 PM, Jenn G. wrote: > but nobody run Java or PHP as CGI. > the only thing I heard is somebody run php as fastcgi under lighttpd. Some cheap ISPs run PHP as CGI for security reasons. My point is, it doesn't make any difference if Perl is slow when you run it as CGI, s

Re: Why people not using mod_perl

2009-09-16 Thread Steven Siebert
I would also add, in addition to the frameworks, the availability of tools such as Netbeans and Eclipse IDE's are unmatched in the perl domain. These IDE's provide many high-level conveniences for enterprise developers, most notably in the realm of SOA (such as graphical building of BPEL and CEP).

Re: Why people not using mod_perl

2009-09-16 Thread Igor Chudov
You must have use my module Net::eBay, at some point, right? I wrote Net::eBay about 3 years ago. Igor On Wed, Sep 16, 2009 at 9:47 PM, Jeff Nokes wrote: > Doesn't Amazon run mod_perl/Mason? > > BTW, I agree with most of your points (would debate #4,5). I may > substitute the phrase "More con

Re: Why people not using mod_perl

2009-09-16 Thread Jeff Peng
from what you all stated, does it mean mod_perl is really outmoded comparing to Java? Here Java programmer is cheaper than mod_perl developer. But if mp can get better performance, we may consider it as first choice. Regards, Jeff.

Re: Why people not using mod_perl

2009-09-16 Thread Jeff Nokes
Well, actually Igor, we ended up writing eBay::API. We needed something that was able to extend many more web services that are internal-use only, that the public doesn't have access to. The fact that eBay web service data-types are probably the most complex out there, and they change often, w

Re: Ways to scale a mod_perl site

2009-09-16 Thread Jeff Peng
How many servers? We have run the systems with about 500 million PV each day, with many squid boxes + 200 apache webservers + 200 mysql hosts. The applications were written with FastCGI. -Original Message- From: Igor Chudov Sent: Sep 16, 2009 11:49 AM To: Mod_Perl Subject: Ways to s