Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9834949D9 for ; Tue, 21 Jun 2011 16:09:29 +0000 (UTC) Received: (qmail 74288 invoked by uid 500); 21 Jun 2011 16:09:28 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 74255 invoked by uid 500); 21 Jun 2011 16:09:28 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 74248 invoked by uid 99); 21 Jun 2011 16:09:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 16:09:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pharkins@gmail.com designates 209.85.212.49 as permitted sender) Received: from [209.85.212.49] (HELO mail-vw0-f49.google.com) (209.85.212.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 16:09:23 +0000 Received: by vws8 with SMTP id 8so5354509vws.22 for ; Tue, 21 Jun 2011 09:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=9zKEedv0D5YdCIGVK6XyBjEAKSMrFqyaMbM84zZObxk=; b=GyT86FRGYRGfNMpEgKNqd0JX8wKaYvyP7Agry1kYwpJzRVZmKllX3Ot3lr1H2c1u28 Z6Rrj2aZL/UBPzbJ7SWIyi4doTAiCUjL7KPbfnwQ70Viyvh+3zaPpTthPK6sYLRIlr/m QFmKQwAw6wROStle4Tc/ip12zKmGyXqFIckIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=raihZG4lZKN6uEBdXYEHHO+yfilRPSGUQUBo9WzObcUmYUFtzfdy7S/NItMyhOL5m/ n4hJCs8H7lewflxnNm0u3QBC+/37q3bsaqtdqj6lMWXLfhYBWapsyeAzl7Ic330ArpMf KQwB6HFdOff+GCWh6uu5XJhg4kYFjlpfE24jo= MIME-Version: 1.0 Received: by 10.52.173.111 with SMTP id bj15mr95906vdc.122.1308672542336; Tue, 21 Jun 2011 09:09:02 -0700 (PDT) Sender: pharkins@gmail.com Received: by 10.220.182.65 with HTTP; Tue, 21 Jun 2011 09:09:02 -0700 (PDT) In-Reply-To: <4E000948.15516.6D8595@randolf.modperl.pl> References: <4DFBE32B.30628.BC197C@randolf.modperl.pl> <4E000948.15516.6D8595@randolf.modperl.pl> Date: Tue, 21 Jun 2011 12:09:02 -0400 X-Google-Sender-Auth: BekkPHjq1uWhM8XJM4CttH2WV50 Message-ID: Subject: Re: How do you use mod_perl for your web application? From: Perrin Harkins To: randolf@modperl.pl Cc: mod_perl list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Jun 20, 2011 at 11:00 PM, Randolf Richardson w= rote: >=A0I have encountered some people > (not just in the DBIx::Class community) who have told me things like > "you should be using FastCGI instead," or "you're crazy to not run > mod_perl behind a proxy," etc. Well, this is a sidetrack, but the proxy advice is just about separating the processes delivering bytes to browsers from the ones doing the perl work. Proxies are not the only way to achieve it, but the general concept is sound. It cuts down on the number of processes needed to server a given number of clients. > =A0 =A0 =A0 =A0One argument that I see come up a lot is "it hasn't been u= pdated in > years" as if regular updates are an important measurement. Besides the pointlessness of this criticism, it's also not true. There have been recent updates to mod_perl, httpd, and perl. I doubt that mod_fastcgi is getting a lot more updates, and I doubt that the alternative servers for FastCGI or PSGI are getting a lot more updates than the combined total of httpd (which is mod_perl's server) and its modules. When you use mod_perl, you get a huge number of people maintaining and testing all the components that come together in the form of apache modules like mod_deflate and mod_ssl. >> You'll always get better performance from straight DBI than from ORMs >> like DBIx::Class or Rose::DB::Object. =A0They just save you some >> repetitive code for simple things. > > =A0 =A0 =A0 =A0Yes, but I'm wondering if the caching being shut off in th= e ORM > might be a major contributing factor as well because the difference > is very noticeable (plus, for certain things I see a lot of extra SQL > queries in the logs when I'm using the ORM), although it also wasn't > performing poorly before switching to DBI (which I think is an > excellent testimonial for mod_perl2's performance). ORMs just can't be as intelligent about which data to retrieve as custom code can. SQL is too powerful a tool to be fully captured in the limited APIs they have. They are very useful for cutting down on boilerplate code though. - Perrin