Re: Alternatives to CGI perl module

Igor Chudov <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CAMhtkAawwL6ybJ8OKrvXbtDnbYPRTSSvEsAzmy7DP+NUp8th9w@mail.gmail.com>
On Sun, Sep 11, 2016 at 10:23 AM, Ruben Safir <[email protected]> wrote:

> On Sun, Sep 11, 2016 at 09:46:52AM -0500, Igor Chudov wrote:
> > Ruben, thank you for your opinion. You have your own opinion and I have
> > mine, and that is what makes the Internet beautiful.
> >
> > Take a look at your own website coinhangout.com. It is down right now.
> But
> > take a look at its google cache:
> >
> > http://webcache.googleusercontent.com/search?
> q=cache%3Awww.coinhangout.com&oq=cache%3Awww.coinhangout.
> com&aqs=chrome..69i57j69i58.1525j0j4&sourceid=chrome&ie=UTF-8
> >
> > click on View Source of that.
> >
> > There you see that most of the page is perl code, in embperl wrappers.
> Just
> > a little HTML head and ending is HTML.
> >
> > This is what I found to be typical of most pages.
>
>
> That is called templates, BTW and is common.  In that case I was
> importing a large modperl application and embedding it into a second
> page.  It was pretty quick and dirty but it did the job to about 80K
> hits a day on a little atom fit/pc processor.
>
> I stopped using the page when someone stole all the coins on the site
> from their home. I lost my stomach for it and passed the site along to a
> friend who may or may not be using it.
>
>
I am sorry to hear this, I am sure that it was a sad moment. Remind your
friend to change the WHOIS information on this domain.


> That doesn't make CGI.pm any less of a pig.  It is th swiss army knife
> of internet programming, but it has a huge cost, especailly if you are
> using large pages heavy on content that are cached in RAM.  It also runs
> a lot of contacts, and can gum up the OS scheduler and wait cues real good.
>
>
>
I use CGI.pm exclusively inside mod_perl. At peak demand around 7pm on week
days, when everyone is doing homework, I serve about 170 or so requests per
second. The server is a 8 CPU virtual server running in google cloud and it
is about 50% busy.

About maybe half of those responses are images generated by mod_perl/CGI.pm
scripts that draw pictures of math formulas like x/(x+1) etc.

I agree that running CGI.pm inside true CGI scripts (one process per every
web object) is expensive. Running it inside mod_perl seems to be extremely
efficient.


>
> >
> >
> >
> > On Sat, Sep 10, 2016 at 10:58 PM, Ruben Safir <[email protected]>
> wrote:
> >
> > > On 09/10/2016 09:53 PM, Igor Chudov wrote:
> > > > It turns out that HTML has a very minor and subordinate role to perl
> > > > application logic, and putting "perl inside html" was completely
> > > misguided
> > > > and instead I decided to "make html inside perl". Using CGI module of
> > > > course. This was far more maintainable.
> > >
> > >
> > > Just for the record, this is not correct and I think time has proven
> > > that integrating language into the html output has resulted in a
> Marjory
> > > of active server pages.  Aside from Perl, there has been similar
> > > constructions in python, rails, php, etc etc etc...
> > >
> > > I just have a distaste for opinions spouted as facts.
> > >
> > > If anything, CGI.PM is the clumsy huge animal and is problematic, even
> > > from the beginning.  There has always been work arounds to sidestep it
> > > including fastcgi et al.  Use of it is a (huge at times) convenience
> for
> > > some, but speed, organization and efficiency are not it's benefits.
> > >
> > >
> > >
> > > --
> > > So many immigrant groups have swept through our town
> > > that Brooklyn, like Atlantis, reaches mythological
> > > proportions in the mind of the world - RI Safir 1998
> > > http://www.mrbrklyn.com
> > >
> > > DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> > > http://www.nylxs.com - Leadership Development in Free Software
> > > http://www2.mrbrklyn.com/resources - Unpublished Archive
> > > http://www.coinhangout.com - coins!
> > > http://www.brooklyn-living.com
> > >
> > > Being so tracked is for FARM ANIMALS and and extermination camps,
> > > but incompatible with living as a free human being. -RI Safir 2013
> > >
>
> --
> So many immigrant groups have swept through our town
> that Brooklyn, like Atlantis, reaches mythological
> proportions in the mind of the world - RI Safir 1998
> http://www.mrbrklyn.com
>
> DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> http://www.nylxs.com - Leadership Development in Free Software
> http://www2.mrbrklyn.com/resources - Unpublished Archive
> http://www.coinhangout.com - coins!
> http://www.brooklyn-living.com
>
> Being so tracked is for FARM ANIMALS and and extermination camps,
> but incompatible with living as a free human being. -RI Safir 2013
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.