18.11.2014 Views

WebExp2 Experimenter's Manual - School of Informatics - University ...

WebExp2 Experimenter's Manual - School of Informatics - University ...

WebExp2 Experimenter's Manual - School of Informatics - University ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 Running a new experiment<br />

This section describes how to set up a new experiment locally for testing. The basic procedures for starting the<br />

server application and the client applet where outlined in section 3 about running the sample experiments.<br />

To tell the server about your experiment, you must update the server configuration files. You must also write<br />

a web page for your experiment, supplying an tag with suitable parameters.<br />

6.1 Editing the server configuration files<br />

You will need to edit the server configuration files to tell the server which experiments it should be administering.<br />

There is one file describing the experimenters who use the server, and each experimenter has another<br />

configuration file describing his or her experiments.<br />

Currently you will have to restart the server if you want to add new experiments. In the future the system will<br />

be adapted so new experimenters can be added while the server is running, and their experiments can also be<br />

added or modified easily without restarting the server.<br />

The format <strong>of</strong> these configuration files is straightforward — they are XML files and so start with the XML<br />

declaration. The body <strong>of</strong> the file is merely the root element within which configuration information<br />

for experiments or experimenters is described. Note that XML is described in more detail in section 4.2.1.<br />

6.1.1 Configuring experimenters<br />

Edit the data/experimenters.xml file to include a record describing yourself, as in figure 20. Each experimenter<br />

needs a unique ID, and a name. The ID is used to create data directories, and to identify the experimenter when<br />

the client requests an experiment. It should not contain spaces. Usernames serve well as experimenter IDs.<br />

Figure 20: An experimenter configuration record.<br />

<br />

default<br />

Dr Default<br />

<br />

6.1.2 Configuring experiments<br />

Create an experiments.xml file in your experimenter’s directory (data/yourID/) to describe your experiments.<br />

It may be easiest to just copy the file from the default directory and edit the contents.<br />

For each experiment you want to add to the server, you must add an element to the configuration<br />

file, similar to that in figure 21. Each experiment needs a unique ID, and a meaningful name. The ID is used to<br />

create a data directory for the experiment, and to identify the experiment when the client makes a request.<br />

6.1.3 Create a directory for your experiment<br />

Ensure that a directory data/yourID/yourExperimentID exists, and place your experiment description file<br />

yourExperimentID.xml within it. Subdirectories for results will be created automatically. A running record<br />

41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!