Simon Hood
[email protected]
Introduction
- perl
- "standard" CGI, so not persistent (contrast FCGI).
Database
- The cgi-scripts interact with the database through CDF.pm, Thingy.pm
and Tree.pm, three OO modules. These provide an abstraction layer so
that the database can be changed without affecting the client-related
code.
- Currently the database is very simple: we just use the file-system
on the (unix/linux) server and some SGML files. This is not particularly
efficient, but is simple and plenty fast enough for a few dozen users
with a few thousand files. Should an improvement be necessary, we can
consider DBM files, SQL...
Authentication, the Password Abstraction-Layer/Subsystem
- Once authentication has taken place a cookie is set which lasts for
the current browser session only.
- Authentication is by username/password. The current implementation
uses a password directory, PASSWD, in which password files
reside. These files include usernames, encrypted passwords and
names of groups in which users belong. More than one password file
can be used. For example, one for permanent, development staff, one
for temporary guests, ...
- The cgi-scripts interact with the username/password/group directory
through _sal/Passwd.pm an OO module which provides an
abstraction-layer, thus the whole system could be changed to use,
e.g., LDAP-authentication, with ease.
Exception Handling
Perl's error detection is good but it's error handling is not up to that
required for a safety-critical system, nor indeed a document repository.
So I wrote a simple exception handling mechanism (_lib/exceptions.pm).
Depending upon the severity of the exception raised various things can happen,
from a simple message to the user to a forced exit.
All raised exceptions are logged.
Logging
A logging mechanism (_lib/log.pm) is used to keep a check on
various events. These include all raised exceptions.
--
About this document:
Produced from the SGML: ./_reml_grp//devel.reml
On: 14/0/102 at 11:20:12
Options: reml2 -i noindex -l long -o html -p single