Dear All

I've writen a small IPC sysV based shared cache thingy ... (useing
IPC::ShareLite), and I'd like some comments oin the design if anywants
to crtique...

Why / the problem:

I work in a dept where the coderes (Me !) code, and the HTML design
people do HTML.  The only commonality we share is that we agree on a tag
name (place holder ... where they want my dynamic content to go) and the
size of the content to be placed.  They then create the HTML (templates)
with tags, and I code perl that looks for these tags in the templates.

Nothing special so far. (The templating module is very, very simple and
only deals with new tags and
templates).

When mod_perling I used to load all the templates into an object that
had one class attribute - a hash of these templates.  The apache
children can create a new object(s) that will have the templates in the
class attribute 'cache'.  This is fine until you want to change anything
- you need an apache restart.  This was not really an issue, until we
had a new design which had often changing nav bars because new sections
are added / removed (often being daily sometimes hourly at times).

A Solution

Not whishing to use mod_perl to create any semi dynamic data (changes
daily /
hourly) etc. I thought about Sysv shared memory and
IPC::ShareLite.  Having had a "classical" Database training, I normalise
everything into modules quite aggressively (or at least try to think I
do).

Hence I want these templates in memory, and shared by all processes -
so that if a change needs to be made an exterior process can change one
or more
cache entr{y|ies}, and all apache children will then use the new cached
template.

Apart from security of the Shared memory - I see no major issues - but I
be looking through rose tinted specs...

Can any one see any major issues with this from a mod_perl prespective ?

If anyones interested in having a look see - drop me a line - as I'll
have to clear it up a bit !

Greg Cope


Reply via email to