Path: news.cs.au.dk!not-for-mail From: "Sascha Kimmel" Newsgroups: comp.lang.beta Subject: RE: BETA for CGI Date: 21 Jun 2000 08:30:46 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 110 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <20000621083046.10700.qmail@noatun.mjolner.dk> Reply-To: "Sascha Kimmel" NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 961576905 352666 255.255.255.255 (21 Jun 2000 08:41:45 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 21 Jun 2000 08:41:45 GMT Xref: news.cs.au.dk comp.lang.beta:12474 > -----Original Message----- > From: Georg Bauhaus [mailto:sb463ba@l1-hrz.uni-duisburg.de] > Sent: Monday, June 19, 2000 7:50 PM > To: usergroup@mjolner.dk > Subject: Re: BETA for CGI > > > Erik Corry (corry@mjolner.dk) wrote: > : Sascha Kimmel wrote: > : > Lars Balker Rasmussen said: > > : With a perl CGI the perl interpreter would be shared in the same > : way, but every time you start the perl script the interpreter has > : to compile the script to its own internal format. > > : The performance tradeoff depends on how large your perl program is, > : how many different CGI scripts you have, whether perlmod is an > : option and how heavily you use regular expressions, which are > : heavily optimised in perl. > > : > much RAM for this (imagine a high-load-website with 50 calls > to your CGI app > : > (in BETA) per second - if your file has a size of 1MB this > means starting 50 > : > of these files as fast as possible, so that the clients don't > have to wait > : > and "wasting" your RAM with 50MB of code. > > >From experience in a relatively high load setting[+], > I would like to submit that running Perl-CGI Scripts on our > servers with high load (>50 apache instances, grouped using > different configurations, order of a million hits per month) had > to be dropped, not enough performance because of > startup/compile/interpret. (Lots of dynamically created content, Did you ever think about upgrading/clustering your web servers? You can also dynamically redirect any incoming connection via DNS to the corresponding server, e.g. redirect from www.* to www5.* and so on. > DB-supplied). Then mod_perl was compiled in, blowing up the > executables (it looked like Perl cannot be shared across instances > of apache). > > Perl programming then becomes a trickery: Avoid using any global > variables, consider *every* warning Perl can give you, in essence > stop using Perl as a _scripting_ language. Depends on WHAT you're programming! > Learn a lot about unix processes and forking, all this > in connection with the built in perls, mod_perl-required additional > configuration, and the modules' data handling. > Touching Perl library modules that were used in the scripts would > not be noted in the running servers, thus signal -HUP or -USR1, > reload. > > : >> [The implementation of a PERL::CGI-like] > : >> module for BETA is left as an exercise to the interested reader. > > For quite some CGI scripts CGI.pm turns out to be overkill. I NEVER use cgi.pm > While easy to use, much of it can be avoided at the cost of > a few hours/minutes of addtional programming. Afaics, CGI.pm is > a convenience module, not something to be used where performance > counts[*]. Thus, if I may say so, this might reasonably remain > a recurring exercise :-). > > As for REs, we have found (once again, presumably) that they form > only small part (the "data laundry" stage) of the algorithmic > work in a script that does something. Again depends on WHAT you're programming and WHAT your website is all about! > Thus, it seems like in this kind of setting, the myths > have to be boiled down somewhat in order to arrive at > figures that .....? Where's the end of the sentence? > With apologies for mentioning still another language than BETA > for a RE source, there is a free implementation of SPITBOL > patterns in the GNU Ada 95 compiler libraries. (no GPL need). > > How do you intend to have programmers build REs in a BETA > source program? Using strings of "+\w\G\d*(?i:#)"-Syntax? > Really? :-) Yes, of course! It's quite intuitive to understand such patterns IF you understand REGEX! > I'd prefer a mix with sth like > re.alpha->re.digits->re.compile->matcher; > where alpha and digits output corresponding RE-patterns > > (Sorry if I messed the syntax.) I prefer easiest implementation which does not always have to be very strict regarding the syntax! Regards, Sascha Kimmel