RTSERVER
In this section we cover what the GNU.FREE Regional/Totaller server software does and also provide a brief overview of its classes.
|
What it does |
Provides a multi-threaded server system which can be set as a regional or totaller server setup.
As a regional server it listens for vote packets, checks their validity and records them in a database. When the vote is closed, by the administrator clicking a button, the regional server adds up the sub-totals for each party/choice and sends these on to the totaller server.
In totaller mode it receives sub-total packets, verifies them and then stores the results. When all results are in the results are presented.
|
AuthKey.java |
Contains algorithms to build unique single-use Authorisation Keys which are issued to valid voters when they have been authorised. Also contains logic to encrypt and decrypt data using keys built by the FreeInstall program.
|
ClientProtocol.java |
This contains the logic for dealing with the packets sent by totaller servers to RTServer in repsonse to it's sending a packet. It operates on a) the type of packet, and then b) the data in the packet.
|
Comms.java |
Stores some key constants such as the addresses of servers. It is responsible for building packets and sending them to the correct server while dealing with any error conditions. As a consequence it spins off threads for every communications to keep the rest of the system responsive.
|
Dbase.java |
Includes JDBC code for initialising, storing and retrieving data Hypersonic SQL databases which connects through the Free.DBPool cache drivers. Since 1.5 this class also encrypts/decrypts all data in the database.
|
DBFrame.java |
An AWT frame which provides a console for executing SQL queries on the Hypersonic SQL database.
|
freeawt.jar |
Contains files supporting the AWT GUI.
|
freedbpool.jar |
Holds wrapper drivers and methods for supporting a method of database cacheing called connection pooling which focusses on preventing the constant creation of new JDBC connections which are known to be the major overhead of JDBC communication.
|
freeutil.jar |
Stores utility files such as the Packet data structure, MAC methods and optimise String <-> Byte conversion algorithms.
|
hsql.jar |
Archive containing all the classes for the Hypersonic SQL database. NOTE: This has been recompiled to use the version that supports Java 1.1.x and is not the same as the .jar file included with the HSQL download.
|
Intro.java |
Standard AWT-based frame asking the user to choose between Regional or Totaller.
|
log4j.jar |
The archive file holding all the classes for the log4j logging system used.
Two logging categories are currently used: NORM & DEV. NORM encompasses messages of Info level and higher. DEV is for debug and higher where the hierarchy is Error > Warn > Info > Debug.
DEV provides detailed debugging log messages which could be left enabled for more complete security logs however this does risk privacy if ERServer and RTServer logs can be brought together. The logs are by default written to rtserver.log and erserver.log respectively. This and other properties are set in log4j.rtserver.properties and log4j.erserver.properties which, by default, make log4j roll over log files when they hit 10Mb leaving a maximum of 3 files on disk.
|
RTFrame.java |
An AWT-based frame for showing information on server status, using a scrollable text pane.
|
RTServer.java |
The main class, which must be executed for the program to launch. It creates the splash screen, initialises classes and loads the GUI.
|
ScreenAppender.java |
Implements the log4j.Appender interface. This allows the class to be added to the logging categories as a valid appender thus meaning that a single command will write to the log files and the output screen dramatically improving performance.
|
ServerProtocol.java |
Holds the logic for responding to packets sent to the server by clients or Regional servers. It acts on a) the type of packet and then b) the contents of the packets data section.
|
TCPClient.java |
A threaded class for connecting to servers so that the client can then send and receive packets.
|
TCPServer.java |
A threaded implementation of a TCP/IP server that listens on freePort for client connections. When a connection is accepted it is spun off into a new thread. All data received is then fed to ServerProtocol for processing.
|
TimeOutThread.java |
An extremely simple thread that is started when Comms.java starts a communication. It waits a time set by RTServer.timeOutTime before cancelling the transmission. If the communication was successful then the thread is stopped before this timeout can occur.
- Dev Home -
|