[BNE-PM] cgi architecture

Don.Simonetta at mincom.com Don.Simonetta at mincom.com
Wed Sep 25 23:44:53 CDT 2002


Sorry for the late response on this one - I somehow missed it when it
arrived.

Just wanted to add that we have a situation where we use a similar
architecture to that described by Derek below - only for completely
different reasons. In our case its so that Internet access can run a
process behind our firewall (to access an internal database via intranet
CGI).


-----Original Message-----
From: owner-brisbane-pm-list at pm.org
[mailto:owner-brisbane-pm-list at pm.org] On Behalf Of derek at wedgetail.com
Sent: Friday, 20 September 2002 16:20
To: d.bussenschutt at mailbox.gu.edu.au
Cc: brisbane-pm-list at happyfunball.pm.org
Subject: Re: [BNE-PM] The Perl one-liner

David Bussenschutt wrote:
 > I expect that I will eventually run in
> mod_perl, but I haven't needed that yet (or figured it out either)
;-)
> 

I think you're going to have to look at mod_perl before too long. I've 
never done any CGI/Web app stuff whatsoever, so I can't really say how 
easy that will be.

Another approach would be to get all that work out of the CGI program, 
and into a server that sits on your machine permanently, and does all 
the "grunt work".

So, your setup looks like this (set your fonts to "fixed width"!):

+----------+                             +--------------+
| CGI      |  CORBA/SOAP/adhoc protocol  |  Perl server |
| "script" |---------------------------->|  process     |
+----------+                             +--------------+

So, your CGI script just connects to the server, passing the arguments, 
like say a cookie and some form fields, and gets back shiny new HTML to 
display. The server never dies, so not only is it "warmed up", but it 
can also cache database connections, keep those 6-12 sockets open for 
reuse, cache data from other sources, and so on ad infinitum. You can 
also move the server to a different, more powerful machine, or even 
replicate it across many machines!

You can use any protocol you like, ranging from standard, like CORBA or 
SOAP (which has the advantage that you can switch the server to 
Java/Python/C++/C at will without writing a bunch of code), or just make

up your own little ASCII protocol and use that.

Anyway, even if you do use mod_perl, I think this design still has many 
benefits.

--
D.



-- 
This transmission is for the intended addressee only and is confidential information.  If you have received this transmission in error, please delete it and notify the sender.  The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise.




More information about the Brisbane-pm mailing list