On Wed, Jul 11, 2001 at 03:45:05PM +0530, George S Pereira wrote:
> My aim is to create a website using Perl for dynamically creating
> the webpages. But I don't want to use CGI, because I read that since CGI
> create a seperate connection for every user, it thereby uses more memory,
> than say an ASP application.
The typical implementation of CGI spawns a seperate process, or possibly a
thread, not a seperate connection.
Don't dismiss CGI offhand. It can be a simple and easy way of dynamically
generating content, and it doesn't restrict the language you use. There are
things to help speed up CGI, such as FastCGI and mod_perl's Apache::Registry
(though that will restrict you to Perl).
As for memory, you have to decide when, where, how, and why you want to use
it. mod_perl will cache everything, which will significantly increase the
memory footprint of Apache, but in many instances this is a good thing,
because it speeds up execution time. It's true the total memory usage of
many subprocesses spawned due to CGI requests over time will dwarf anything
else, but this memory usage is fleeting, the program exits quickly, and the
resources are released back to the OS.
I'm not sure where you read that CGI takes more memory, but if that's all it
said, with no elaboration, find a better source of information. There are
tradeoffs and compromises to be made in finding a solution that works in
your situation. While asking a list is a good start on your way to finding
accurate information, you know your situation best and are best equipped to
research, weigh, benchmark, and judge which solution fits.
> I don't mind using CGI, but if there are other options available,
> then I want to look thru them also.
Well you've been presented with plenty of options, you should look through
them and find what's a) most appropriate for your environment and b) most
appropriate for your problem.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--