Re: CGI Question

by "Paul Rudolf" <paul(at)ntyc.net>

 Date:  Wed, 17 Jan 2001 15:07:40 -0800
 To:  <hwg-servers(at)hwg.org>
 References:  tconsult omnitec hotmail
  todo: View Thread, Original
About a year ago, I had one of my customers claim that an SQL server on an
NT platform was the only way to handle his on-line database querying
routine.  His database was about 60 meg, and a simple flat file.

Being the type that I am, I decided to test a query using a simple perl
script against an ascii database file.  First, I wrote a perl script that
created a database of 250 fields of random characters with the last field
being the sequence number.  If I remember, there were about 25,000 records,
or at least enough to have a 60 Meg database file.  (Note, all of this was
done with our shell account on the ISP's web server -- 4 year old Sun
Solaris.  I don't know how fast the machine was, nor how much RAM was
installed.)

Then, with a simple web page form and a perl script, I queried the database
for the last field of the last record.  In other words, sequentially read
each record until the match was found.  The results were displayed in less
than 5 seconds.  Another test was to query a pattern, pulling a few hundred
records.  Of course the results page took a while to display, but with a DSL
connection, less than 20 seconds.  Needless to say, good ol' perl handled
the task quite well.  In a multi user scenario with hits coming every few
seconds, SQL would have been the obvious choice.  But for the few queries
per day, this worked fine.

ASP is also CGI (Common Gateway Interface).  The application program must
still be loaded by the server in order to process the form being submitted.
Actually, just by having one of the ASP extensions on the file name, will
probably trigger the web server to start an application on the NT box, not
making it (IMHO) more efficient.  It has been my experience that the .exe or
.dll file in compiled form is quite larger than the equivalent perl or php
script in ascii form.  Also, *nix will do the job faster than NT on similar
equipment, and require much less for supporting hardware and software.

ASP does have the benefit that it will directly interface with other
Microsoft applications and data.




Paul Rudolf

System Administrator
Personal Software Systems/NTYC.NET
"Your Connection To The World!"

mailto:paul(at)ntyc.net
http://www.ntyc.net

----- Original Message -----
From: "Mukesh Wani" <mukeshwani(at)hotmail.com>
To: <hwg-servers(at)hwg.org>; "Leland V. Lammert" <lvl(at)omnitec.net>
Sent: Wednesday, January 17, 2001 12:06 PM
Subject: Re: CGI Question


> I think CGI is very inefficient.  When a request is sent to a CGI program,
> the Web server has to load, run and unload the entire CGI.  Thats for each
> request.  Linux w/ Apache handle this process efficiently.  Thats why when
> CGI came out, everyone went to linux for their web applications.  Also CGI
> programs/pages are often not readily portable to other platforms.
> Microsofts' ASP is the same way as CGI, i.e for each request sent to the
> ASP, the web server loads, runs and unloads the script.  ASP is also just
> for microsoft which is a major drawback if you are switching platforms.
> On the other hand, I think Java Servlets is the way to go, and the market
> shows that (ATG, Blue Martini, Weblogic, even Vignette).  Since Servlets
are
> written in Java, they can be easily ported to Micrsoft, Linux, Unix,
> Solaris.....whatever platform that supports the Servlet API.  Also
servlets
> run as a thread inside the web server process so it is much much much more
> efficient than CGI and ASP and all major web servers support Servlet API.
> Free Java App server is available from Jakarta Tomcat.
> I think you will see CGI slowly drift away because of inefficiency.  Only
> small "personal" web sites and servers will keep using it because of the
> linux/CGI bandwagon that they are on.  Also perl wasn't written for the
web,
> and its not the ideal language to use for the web.
>
> HTH,
>  Mukesh
>
> ps (these are my opinions, you may agree or disagree with them..... I
don't
> care).
>
>
>
>
> ----- Original Message -----
> From: "Leland V. Lammert" <lvl(at)omnitec.net>
> To: <hwg-servers(at)hwg.org>
> Sent: Wednesday, January 17, 2001 12:03 PM
> Subject: Re: CGI Question
>
>
> >
> > >
> > >I personally do not know why anyone would put too much
> > >effort in to learning CGI.  Especially if you are new.
> > >You will obtain success much faster and get way more
> > >satisfaction out of ASP (Active Server Pages).  If you
> > >don't have access to it, get access to it.
> >
> > What does ASP have to do with CGI? ASP is a VERY steep learning curve,
..
> > greater than PHP and a LOT bigger than Cold Fusion (the only widely
> > accepted alternatives). The biggest problem with ASP is that the server
> > configuration itself is a nightmare - I have tried to get it working
four
> > different times and never succeeded.
> >
> > >Unless you need to know CGI of course :).
> >
> > Please do not give the impression that CGI ias ANY relation to ASP!! ASP
> is
> > a scripting language embedded in an HTML document, .. CGI is a program
> > running ON the server. CGI is the the interface between a web server
(IIS
> > in your world) *TO* a program running *ON* the server. By itself, CGI
has
> > absolutly nothing to do with an HTML document.
> >
> > >By the way, the Internet is about to make a big left turn.
> > >Surprisingly many people do not know it yet.
> > >But ASP.NET will revise the Internet 10 fold.
> >
> > Sure, .. that just means we know which direction YOUR prayer carpet is
> > pointed at sunrise!! Microsoft is still claiming to be increasing market
> > share right? NOT. The majority of the work done in the current
marketplace
> > is done by small developers like ourselves. I, for one, could never
> justify
> > the $10K+ pricetag to subscribe to the Microsoft world. Just because we
> > don't purchase our software from a vendor that reports quarterly sales
> does
> > NOT mean that we are not here, and doing quite well, thank you, without
> ANY
> > Microsoft products.
> >
> >          Lee
> > ============================================
> >     Leland V. Lammert                                lvl(at)omnitec.net
> >        Chief Scientist                         Omnitec Corporation
> >    Network/Internet Consultants              www.omnitec.net
> > ============================================
> >
> >
>

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA