SPUG: Java, Perl, large-scale projects

Marc M. Adkins Marc.M.Adkins at Doorways.org
Fri Jun 14 14:18:48 CDT 2002

> > When I worked at cobalt in Jan 2000, there was a 'big push for
> java'.  The
> > basis I was told was that it leaks to much for modperl, and they are
> > spending a fortune in hardware.   The performance of the code
> was terrible.

> The vast majority of the sites are still using perl. I don't know
> about the
> other groups, but Chrysler isn't doing mod_perl, we're doing straight
> template-based CGI. Otherwise it WOULD be impossible to maintain
> everything.
> As it is we have master scripts that generate the websites in
> general, then
> we can make changes to specific websites as necessary.

I thought I would mention a another option for using Perl to serve web
pages:  www.fastcgi.com.  FastCGI is a mechanism for developing stand-alone
web application generators that handle page requests for the web server in a
different process.

Basically, the web server gets the page request and sends it on to one of a
pool of processes, which does the work and returns the response through the
web server.  It's been cleverly designed to provide a coding environment
just like CGI (environment variables and open STDXXX pipes) so existing CGI
code can be ported very quickly.

Because it is a stand-alone process, the cgi startup time (opening database
connections and the like) isn't an issue.  Because it is a separate process
(not in the web server process space) you can do things like kill the
process periodically and let the operating system reclaim the memory.

There are plug-ins for Apache (mod_fastcgi), ISAPI, NSAPI, and a couple of
lesser-known HTTP servers that provide FastCGI support directly.  In
addition, FastCGI is language-independent.  The basic library is in C and
there are bindings for C, C++, Scheme, Eiffel, Java, Perl, Python, Ruby,
TCL, and Smalltalk.

It's free.  It comes with source code.

Some potentially negative aspects:

  * There is apparently one guy supporting the core library,
    the language bindings are provided by other people.
  * It comes out of a commercial firm, which retains copyright,
    though the license seems friendly enough.
  * The current load-balancing scheme isn't session-friendly.

The next version, promised real soon now for a while, will supposedly
support Apache 2.0 and provide support for sessions.

I'm not selling anything here.  Just pointing out a tool that can help in
some situations.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org

More information about the spug-list mailing list