leocharre has asked for the wisdom of the Perl Monks concerning the following question:

Had an interesting situation at work recently. We manage some data for clients, as a courtesy we take care of their sites also. These were hosted with a 3rd party hosting provider.

This hosting provider has various other accounts (virtual hosting) we have nothing to do with. One of these other hosting accounts got some attention for hosting illegal content.

The fbi has the machine now. Happened rather suddenly. The sites, the backups of the sites, content, etc .. gone.

Quite not accessible. Having raid doesn't help if the whole machine suddenly disappears :-)
And so, over the weekend we had to put a few sites back up with, nothing. Out of the blue more or less.

Putting these sites together I found some .. almost template setups some of them were built on. Some of this stuff was mainly using ssi includes, making calls to perl scripts for content.

What kinda caught my interest after all this.. I found that putting back together sites with ssi and calls to scripts, seemed very quick and useful. From guerrilla warfare viewpoint.

I toyed around in my head about the idea, of having a few vague scripts, that pages can call for content- via ssi.

What feels ugly - is that if a ssi page calls ten various scripts, for example, then for every query for the resource, the server calls perl/the scripts.. ten times. For every request for every user.

Does anybody have experience designing a site with ssi and multiple calls to scripts for content? Is this a troublemaker or maybe something worth pursuing?

( Of course, it matters what the scripts are doing- that's implied.)

  • Comment on website infrastructure of ssi and calls to scripts bad juju?

Replies are listed 'Best First'.
Re: website infrastructure of ssi and calls to scripts bad juju?
by perrin (Chancellor) on Jan 27, 2009 at 19:37 UTC
    It works for small things. Eventually most people will find a full-blown templating system easier. If you use mod_perl, the SSI calls can be extremely efficient because they don't need to fork or start a new perl interpreter.
Re: website infrastructure of ssi and calls to scripts bad juju?
by tinita (Parson) on Jan 28, 2009 at 16:29 UTC
    Does anybody have experience designing a site with ssi and multiple calls to scripts for content?
    I had to refactor such a system. It was a pain in the ass. And of course it's slow. More than one SSI call per page, and a simple CGI script instead of the shtml would be faster. there are enough templating systems on CPAN to avoid SSI.

      Thanks for telling.

      Yes, my shining pearl of a choice is HTML::Template.

      I just noticed that it was .. convenient. Users/web designers can understand things like,
      <!--#include virtual="/cgi-bin/calendar"-->

      Maybe mod_perl usage as perrin suggests is a possible ring to marry the idea together.