Performance Of The Resource Allocation System Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

After having completed the design phase of the Resource Allocation System, the implementation phase is carried out. First of all, the implementation issues such as performance, responsiveness, load balancing, throughput, quality of service, security and authentication among others. Then html and PHP coding standards and conventions will follow so as to build the codes. Finally, error handling and fault- tolerance in the Resource Allocation System will be discussed.

6.1 Implementation issues

6.1.1 Performance

The responsiveness, balancing and throughput determine performance of the Resource Allocation System. Responsiveness

Whenever a user makes request for viewing project or elective or workload application, the data should be visible on the screen at the earliest within some seconds. The time taken to view the data from the database is one of the criteria that that determines responsiveness. Load balancing

When there is only one web server which is responding to all the incoming HTTP requests for the website, the capacity of the web server will decrease as it may not be able to handle the high the high volumes of incoming traffic once the website becomes operational. The different pages of the website will load slowly as the web server will only be able to process requests when it is free.

The increase in traffic and connections to the website can come to a point where even if the server hardware is upgraded, it will no longer be cost effective. In order to achieve web server scalability and high performance, more servers need to be added to distribute the load among the group of servers. Throughput

Throughput represents the number of Web service requests served at a given time period. It implies to the number of requests that the web service can deal with within a small period. For maximum throughput, many users should be able to make request simultaneously at the same time for the Web Service and the results should be encouraging.

6.1.2 Operating system issues

This project will be deployed on the Windows 2003. This window is a multi- user platform and can support LANs. In fact, in our system, we are inserting wireless network cards and thus, setting a wireless LAN. Windows 2000 is suitable for setting a wireless messaging system. Furthermore, Windows 2000 has a feature which is known as IP Security (IPSec), which helps to protect data transmitted across a network. We also have firewalls, which help to protect computer against security threat.

6.1.3 Fault tolerance

In our system, we have a main server, which is the master, and it is connected to the wireless access point via wires. The master will direct requests to the slaves. In fact, there are two slaves in this system. If one of the slaves fails, the master will direct all the requests to the only slave. There will be a slight delay in processing requests and broadcasting the messages.

6.1.4 Protocol

Protocol that we are using in the Resource Allocation System is HTTP- Hypertext Transfer Protocol. This protocol is a set of rules which is used to transfer files on the World Wide Web. It provides a standard for web browsers and servers to communicate.

6.2 Standard and Conventions

Conventions refer to the standard way that the programmer follows in order to make the programs easier to read and understand. After some time, even the original author tend to forget some parts of the program, as such the conventions can help for future maintenance as well as help the developers to work in a quick and consistent way. Several types of conventions have been used in our project and have been described in the following sub-sections.

6.2.1 Naming Conventions for variables

Different types of variables have been used during the coding phase. Thus, these variables must be named in a standard way for future maintenance. The table 6.1 below illustrates the naming conventions that have been used in our whole system.

Data Types











(drop down or list box)

listState, listCountry





Table 6.1: Definition for naming convention

6.2.2 Guidelines for naming variables

The variable name should reflect the purpose of the variable; for example, the variable name ‘txt_firstname’ represents a textfield for first name.

6.2.3 Code Conventions


Indentation has been used during the coding phase to improve understanding and clarity.

Line Length

The codes have been written in the Macromedia Dreamweaver and the lines which contain lot of characters have been avoided.


Declarations of almost all variables have been done at the beginning of code and we have been declaring only one variable per line so as to encourage comments.


Comments have been used everywhere in the codes so as to facilitate understanding and the purpose of the variables used or even the purpose of a particular function. It helps to explain the complicated code. It has also been used to remove sections of the code but has not been deleted so as to be available for later use.

The formats that have been used are as follows:

<!-- and -->

/* commented text */

6.3 Development Environment

In this section, there is a description on the hardware and software tools that is being used in the development of the system. It also states their main properties needed and the major and necessary options required. It gives a summary about the tools that will be used.

6.3.1 Software Specification

Operating System

Microsoft Windows XP or Windows Vista®

Development Tools

Macromedia Dreamweaver

Macromedia Flash

Editor for html, CSS, Javascript

Macromedia Dreamweaver

Editor for PHP, AJAX

Macromedia Dreamweaver

Table 6.4: Software specification

6.4 Implementation of Login Module

The login module has been developed as a measure of security for the resource allocation system. It is only after having entered the correct user name and password that a user will have access to the system. So, the login module prompts the users (Full-time-Lecturers, Part-time Lecturers, Administrators and Students) to enter a user name and a password. After validating the input, the system allows access to the Resource Allocation System

6.4.1 Issues involved

As a result, the Login Module has been subdivided into several components, that is the validation process, and sign up facility. Validation process

In fact, all the information on members and password are stored in a database. First of all a connection to the database is needed before retrieving any information and validating the inputs.

The server will have to locate that particular username and password from the database. A query is been made to retrieve the required information.

If the username and the password are correct, the user will be allowed to gain access to the system. If either the username or the password is incorrect, the system will display an error message. Sign up Facility

The sign up facility has been created here as we do not have the database containing the details of lecturers. We will create account in their names with different usernames and passwords. We are assuming they do not possess an account to log in to the system.

Implementation of workload allocation to Lecturers module

This module is only for lecturers, who can apply for workload and excess workload. The Lecturer has to login into the system as described in the login module. When the lecturer clicks on the workload application icon, the user is directed to another page where the latter is asked to fill in the form for workload according to their priority.

The following codes show the query used to store all the information in the database.

Firstly we get the values from the input form.

$LecturerID= $_POST["LecturerID"];

$Module_Code= $_POST["FirstA"];

$Module_Name= $_POST["FirstB"];

$programme= $_POST["FirstC"];

$Lecture= $_POST["FirstCD"];

$workload= $_POST["FirstD"];

$Previous_Experience= $_POST["select1"];

Then we will start the data base query

$sqlinsert1="INSERT INTO workload_submission (LecturerID, ModuleCode, ModuleName, Programme, Lecture, Workload, Previous_Experience) VALUES ('$LecturerID','$Module_Code','$Module_Name','$programme','$Lecture','$workload','$Previous_Experience')";

And finally processing the add statement,

$sqlresult1 = mysql_query($sqlinsert1);

if (!$sqlresult1)





{ $message= "Your Application has been submitted.";


Implementation of project Allocation module

After successful login in the Students Corner, the student will be provided with some services. The student will be able to apply for the project he wants to do in the future.

He will be asked to fill in a form where he will be forced to submit a list of 10 choices. The allocation of project is done according to Cummulative Point Average. There are no big steps to follow as it is only the filling of a form manually.

6.7 Implementation of the elective allocation module

After successful login, the student will be able to apply for electives. The student is allowed to input a maximum of five choices, in case where a the first elective selected is not offered, another elective is given to that student according to the order of priority in the application form.

Error handling/ fault tolerance

Error handling is concerned with what flow of actions occur if an error is detected or an exception is thrown. In fact, it deals with the handling of exceptional cases. If an exception occurs, the exception handling mechanism should take over to decide what the next steps that need to be executed are.

6.8.1 Handling connection exception

A failure in the database connection making is caught so that the system continues to function though there is a connection failure. This case is handled by displaying an error message indicating that a failure has occurred.

if (!$con)


die('Could not connect to database: ' . mysql_error());


6.8.2 Failure at the input/ output level

The wireless system is implemented in such a way that it handles IO exception as well. The following code shows how this is done.

6.9.3 Validation

In our system, there are interfaces where data need to be input. The system checks whether the fields needed are empty. If the fields are empty, it will set focus on that field until the user input some data.