Re: Mason + FastCGI

Pedro Melo <[email protected]> Thu, 1 Oct 2009 07:55:28 +0100
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
Hi,

On 2009/10/01, at 02:41, Hans Dieter Pearcey wrote:
> Excerpts from Pedro Melo's message of Wed Sep 30 17:35:16 -0400 2009:
>>> * I don't need a separate webserver-independent config file for my
>>> app
>>
>> I don't understand this one.
>
> It's a reference to ConfigLoader (vs. e.g. PerlSetVar in httpd.conf).

Ahh. Well, with Mason I usually write my own handler code. More out of  
habit that anything else.


>> If it ever does this, I would rather write mod_rewrite rules, in C,
>> fast, than deal with that on the App site.
>
> Of course, then you're tied to a specific webserver; this also  
> assumes that the
> URL is the only difference, as opposed to needing to munge query  
> string
> arguments or provide different defaults for them or whatever.

Well, this is very rare, so not a concern. But as long as the  
webserver config files are version controlled and your test suite  
checks the old URLs for proper redirects and/or the same content as  
previously, I really don't mind.

Changing Webservers is rare. It does happen. I switching recently from  
lighttpd to nginx because I grew tired of the memory leaks. But it is  
rare...


>> I guess I failed to explain myself. My main point was exactly that: I
>> don't need most of what Cat does for me.
>
> OK; then why not use only what you need?  It'd be trivial to write  
> an app whose
> Controller::Root had a single action (at /, with any number of args)  
> that
> handed off to a Mason view to do the real work.  You get fastcgi and  
> the
> standalone server for free AND the Mason component reloading that  
> you enjoy so
> much.

That would work, but isn't that a bit extreme? Use the entire Cat  
stack just to get FastCGI?


> (Even better would be for Mason to work on PSGI, but that's not a  
> useful
> suggestion right now.)

Exactly. I talked to miyagawa a week or two ago about this, but I felt  
that PSGI was still immature. I do think that a HandlerPSGI would be  
great, specially to embed small Mason-based admin interfaces inside  
AnyEvent daemons.

It would be great to have it now, because I could just reuse other  
peoples FastCGI stuff, or even the embedded PSGI module that someone  
is working on for nginx.


>>> My intent is
>>> to correct what I think are your mistaken impressions about  
>>> Catalyst,
>>
>> Well, maybe I'm mistaken about Cat, I don't think so, I do know it
>> pretty well. I might have failed to explain my reasons on my first
>> attempt. I hope to have done better this time.
>
> At first you sounded like someone who'd heard a few things about  
> Catalyst and
> maybe tried it once and thought it was for Big Enterprisey Projects  
> but not for
> smaller things.

I think that everything has its place, and that Mason has a different  
set of strong points than Cat. And in my particular case, they fit  
better for this site.

Best regards,


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf