Chapter 2. WACS Configuration Architecture

Table of Contents

Architectural Overview
Quick Intro To XML
Permanent Configuration
Transient Configuration

Architectural Overview

The WACS system contains a number of components; the basic web applications, the web applications for collection administration, some command line tools and an application programming interface (API) which allows programmers access to the facilities the WACS infrastructure provides from their own programs. Most of these aspects are provided for in the standard WACS distribution with the exception of the PHP5 programming language API which is provided as a separate download. All of these components are tied together by a common configuration system which is based upon the eXtensible Markup Language (XML) standard.

[Tip]Tip

WACS uses a very simple dialect of XML with a very simple single attribute mechanism. It's designed to be as easy to read and edit as possible

Within the WACS system we have two types of configuration files: Permanent and Transient. The permanent files are those that are either created by the installer when the WACS software is installed or created by the WACS site administrator from one of the provided templates. The transient configurations are those that are created and updated during usage of the WACS system; transient configuration files are always changing and will be recreated if they are lost by a system reboot or similar. It is extremely unlikely you will ever need to make any changes to the transient files, but understanding them will aid with fault finding.

Before we look at the two types, let's have a very quick look at a simple example of a WACS configuration file.

Quick Intro To XML

Example 2.1. Simple WACS Configuration file

<?xml version='1.0' standalone='yes'?>
<config>
 <colours>
  <foreground>#0000D0</foreground>
  <background>#FFFFB0</background>
 </colours>
</config>

The above example is actually a valid WACS configuration file which will specify that most of the text is a bright blue and the standard background is a bright yellow. Not probably the most sutble or desirable of colour schemes, but the significant difference in brightness between the two colours used should at least render it very readable.

Let's work through this line by line - the top line is simply a designation that this is an XML file and conforms to version 1.0 of the XML specification. You need it to be there for it to be recognised as XML but you'll never need to change it. The second line states that we're starting a config file, which we do with what's known as an open tag which consists in the word bracketed by less than (<) and greater than (>) symbols. It absolutely must be matched by a partner close tag which consists of the same word prefixed by a standard forward slash (/) character still surrounded in a pair of less than/greater than brackets. This means that the <config> must be matched by a </config> at the end. Since it starts first, config is considered the outermost element - the diagram below may help you visualise it.

Figure 2.1. Logical Structure

Logical Structure

Within the overall class of config, we have a second level element called <colours>. In fact, it is one of many such that you will see when looking at WACS XML files. Within the section <colours> we have two attribute elements foreground and background. Each of these has an attribute, in this case a colour specified in the standard HTML RGB notation - these should be instantly recognisable to most web developers and designers. These attributes are simply enclosed within the open (eg <foreground>) and (eg </foreground>) close tags of the attribute.

[Tip]Tip

The topic of colour selection is a complex one we can't really cover here. The key points are that the colours you choose shouldn't clash but should be sufficiently different from each other as to make the text stand out from the background enough to be easily readable. A web search for "web safe colours" should give you some useful links - a good starting point would be The Wikipedia Web Colors page.

Permanent Configuration

Table 2.1. List of Permanent Config Files

FilenamePurpose
wacs.cfgThe main WACS configuration file: drives most of the code behaviour, display formatting and layout aspects of the WACS system. This file includes configuration for web address, file systems locations, permissions, colours and layout control.
menu.cfgProvides customised menus for all of the WACS applications - these can either be new menus defined for your own applications, or redefinitions of the provided standard menus to add or remove options.
wacs.aclThe access control list for permanent access - this file lists the machines and implied usernames and customisation options for machines with static IP addresses that are granted permanent access without authenication to the WACS system.

[Note]Note

An additional permanent configuration file is planned for a future release of WACS providing a way to alter the defaults for thumbnail generation and other parameters returned by the media_settings function (please see Chapter 20, Media Settings Configuration for more info).

Transient Configuration

Table 2.2. List of Transient Config Files

FilenamePurpose
leases.aclThis file lists the current and recent leases granted for access to the WACS system - it contains IP address, username, role and preference settings.

[Note]Note

An additional transient configuration file is planned for a future release of WACS to allow for preference and temporary suspension features on permenant access configurations.