Elections Server


The Elections Server is a piece of software that is responsible for doing all the work involved in running elections. It is responsible for automatically starting and ending elections, sending out automatic e-mails, validating security, checking to see if everything is working properly, communicating with the Pericles Voting Client and recording votes on a database.

Running the Server

Before running the Server, rmiregistry must be run in a separate window and in the same directory that the Server will be run.

The server must be passed the host that it will be running on as a command line argument. For example:

    ElectionGenerator media15

Election States

The election server operates in several states, which are printed out in the terminal running the server as they are reached. They are as follows:

0 = NEW (no election settings specified yet)
1 = READY (settings specified but no actions taken yet)
2 = EMAIL SENT (e-mails sent to voters if this is an option in the election in question)
3 = RUNNING (votes are being accepted)
4 = STATS (votes are not being accepted anymore but results are not sent yet)
5 = COMPLETE (stats have been sent but election data has not been erased from database yet)
6 = SUSPEND (election is waiting to be suspended)
7 = SUSPENDED (election is suspended)
8 = RESTORE (election is waiting to be restored)
Configuration File

A configuration file is used to store the information relating to the address information of the database and the location to store the log file. A sample configuration file is as follows:

       <dbname> dragon </dbname>
       <dbhost> eddie.cis.uoguelph.ca </dbhost>
       <dblogin> dragon </dblogin>
       <dbpasswd> puffTheMagic </dbpasswd>
       <dbport> 8099 </dbport>
       <votelogloc> SrvLog </votelogloc>
       <electlogloc> SrvLog </electlogloc>
       <reportlogloc> SrvLog </reportlogloc>
Log File

A log file is used to report any errors that occur while the Server is running. Its locatin is stored in the configuration file above. This file should be consulted immediately if any unexpected behaviour is observed in the Server.

Questions or comments: cory@uoguelph.ca

Top to top of page