Serious programming languages competitions world wide use the famous
We were involved during several years in local and regional ACM International Collegiate Programming (ICPC). We have participated at all levels: contestant, coaches and chief judge (KUSTAR, 2006& 2007).
We found that PC2 system has many limitations and weaknesses. PC2 interface is limited to English language. It is mainly used for programming language contests and it is used in local area competitions in one center for example. Although it can be used in different centers, it cannot be used behind firewalls: “in a multi-site contest, every machine running a PC2 server must be able to communicate via TCP/IP with the machines running PC2 servers at every other site. In particular, there must not be any firewalls which prohibit these communication paths; the system will not operate if this communication is blocked” (
PC2 system is restricted only to programming contest types and it is limited to Pascal C/C++ and Java. Recently, Pascal has been dropped as a World Finals Language ( CSUS, 2009).
For these reasons and many others, we decided to design an alternative to this system. We called it Wide Area Contests System, WACS (see Figures 1 and 2) to allow people from different cities or countries to participate in different contests not only programming language contests.
2. System Description
Although the original idea in developing the WACS system was to allow teams from different places to participate in different contests, WACS is implemented with a focus on programming languages contests as in Figure 4. However, other contest types, such as math, physics, Arabic, history and so forth can be easily plugged to the system as long as they are written using web languages and technologies.
The system has three categories of users, which are administrator, judges and contestants or teams. The administrator has full control for the system. He/she is responsible for:
adding, updating and deleting accounts,
adding, updating and deleting problems or questions to solve,
adding or modifying programming languages to the system,
set the contest time, etc.
3. System Architecture
The WACS system is divided into two major parts: the base of the system and the contest type. The base of the system is where the WACS system allows people in:
the same room or different rooms,
in the same building or in different buildings,
in the same city or in different cities,
and in the same country or in different countries
to participate in a contest. It consists of an Apache web server (Apache, 2009) and a MYSQL
On the client side, each educational institution can participate with one or more teams. Each team is composed of three students supervised by one or more coaches.
The contest itself is designed and supervised by the contest steering committee. During the contest, the responsibility is shifted from the administrators to the judges. The administrator will provide the judges with the technical support they need to run the competition smoothly. Figure 5 shows the main parts of the system’s components.
Users communicate and interact with each other through the web server. Every category of users has a different web page to access the WACS. Any action performed in WACS is recorded within the MySQL database system, such as logins, submitting problems’ solutions, etc.. During the contest, each team can interact with the judges through the WACS system only by submitting their solutions and they may ask for clarifications or if they have any doubt regarding any contest question. The judges also can send contestants feedbacks or special messages through WACS only. There is no physical contact between teams and judges during the contest and between contestants and their coaches. The block diagram in Figure 6 shows the interactions between the three categories of users in the system.
Figure 7 shows the entity relationship between various WACS tables. The details of these tables are not covered in this chapter.
Figure 8 shows the state-transition of the WACS system. The figure is self-explanatory.
3. Programming contest
The WACS system is implemented to allow only coaches to register teams. Unregistered coaches, who have teams to participate in the contest, can register and then create accounts for their teams. Coaches have to fill standard forms as shown in Figure 9 to collect information such as names, passwords and email addresses and so on.
The WACS stores the information in the database after checking whether it is there or not and sends an email to the coaches to activate their accounts.
The teams can submit their source code, once they finished solving any problem, via Submit window as shown in Figure 10. It provides the team with two options test the program before uploading it and submit it to the judges.
The WACS administrator can add or remove problems. For each problem, he/she has to set the mark for it and to insert the input and output files into the database. WACS has a script that allows judges to compare the teams’ results (outputs) with the results stored in the database for each problem. Depending on the results of these comparisons, the judges send appropriate messages to any team that submitted any source code for evaluation. The administrator manages the time of the contest. He/She can start, stop or reset the contest time. Finally, WACS has a scoreboard as shown in Figure 11 that allow users to view the teams’ ranks, the number of tries and the number of problems solved by each team and the time taken to solve these problems. It fetches the information from the database and it is refreshed automatically using Ajax techniques (Asleson & Schutta, 2006).
This chapter describes the WACS system as an alternative to the famous
The WACS system can be used inside computer labs, where students are given one or more problems to solve in a given period of time let say one or two hours. This activity will encourage students to work in a competitive environment. For the lab supervisors the code marking will be very easy and quick.
Also students can use the WACS system in their free time such as breaks or weekends to improve problem solving skills and to practice in real competition environment.
4. Future work
The WACS system needs to be tested in large group of teams and between different cities or countries to study the system limitations and performance. Regarding the performance of the WACS system, one should consider the compilation and the execution of programs to be put on a different physical server than the WACS web server. We should have more than one server in the system: One web server to host the WACS system, and at least one more server dedicated to compile the code files, execute the programs on other machines, and get the results from them. Some features can be added to the system, such as:
Security for login: right now, the passwords are sent to the system in clear text. It should be encrypted
The compilation of users’ programs and running them are done with root/administrator privileges, which is not secure at all, since users, can send malicious code to damage the whole system. The solution to this is to use the system as unprivileged users such as nobody in Linux to limit the system damage.
Mirroring the system
The surveillance system: Cameras should be added in each center and should be controlled and monitored by the judges. One camera to monitor each team and several cameras to cover the whole center. If the camera system fails the center is withdrawn from the competition. As an alternative to cameras, each center or educational institution has to send one judge or staff to another center to supervise the competition. The educational institutions will cover the travel and hotel expenses of only this staff instead of all participants and their coaches.
The WACS system is implemented and tested for programming languages and can be extended easily for other subjects such as math, physics, Arabic or any other type to written tests.
The WACS interface is in English language, but we hope to implement also translations to other languages such Arabic, French and others.
As it is implemented now, only the administrator can start contests, add problems and users. It would be nice to allow some privilege users such lecturers or coaches to start their contests, to add their problem sets and to create their users.