Path: news.cs.au.dk!not-for-mail From: "Sascha Kimmel" Newsgroups: comp.lang.beta Subject: RE: BETA for CGI Date: 19 Jun 2000 17:39:06 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 79 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <20000619173906.8583.qmail@noatun.mjolner.dk> Reply-To: "Sascha Kimmel" NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 961436364 289236 255.255.255.255 (19 Jun 2000 17:39:24 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 19 Jun 2000 17:39:24 GMT Xref: news.cs.au.dk comp.lang.beta:12441 > -----Original Message----- > From: Erik Corry [mailto:corry@mjolner.dk] > Sent: Monday, June 19, 2000 4:43 PM > To: usergroup@mjolner.dk > Subject: BETA for CGI > > > Sascha Kimmel wrote: > > Lars Balker Rasmussen said: > > >> As for Sascha's comment: > >>> The only possibility to use BETA for CGI programming is to use BETA as > >>> a language for programming a server! > >> > >> This is not true. > > > Technically it is possible of course, but I don't think that > this is a good > > approach, loading an executable file of some megs in size will > > 1) take some time > > 2) these megs will use up RAM > > 3) make it impossible to do this on a high-load server, because > you need much > > 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. > > Most of this should be shared between the instances, so the RAM use > would be much smaller. Also if it is called frequently, it would be > cached, so it doesn't have to be read in from disk every time. What type of chaching mechanism do you mean? > 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. Yes, of course - but the Perl interpreter is very small! > 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. Perl="Practical Extraction and Report Language" :) > > I guess the only possibility for a high- or moderate-load site > is to use a > > language that is embedded in the server (mod_perl or PHP as module e.g.) > > This is probably true. mod_beta ? :) > >> [The implementation of a PERL::CGI-like] > >> module for BETA is left as an exercise to the interested reader. > > > .. which is not easy because only Mjolner has the sourcecode > for the BETA > > runtime system ... > > I don't think you need to change the runtime system for this sort > of thing. You have the source for almost all the libraries in the > BETA system, only the compiler and the runtime system itself is > missing. And what about a BETA servlets? :) regards, Sascha Kimmel