Professional Documents
Culture Documents
Department of Informatics University of Leicester CO7201 Individual Project
Department of Informatics University of Leicester CO7201 Individual Project
University of Leicester
CO7201 Individual Project
Preliminary Report
[Your name]
[Your email address]
[Your student ID]
1 Contents
2
Abstract 3
1. Aims and Objectives 3
1.1. Aim 3
1.2. Objective 3
2. Requirements 4
2.1. Input/output stream 4
2.2. Signal interaction mechanism 4
2.3. Message box technique 5
2.4. Sandbox connecting manager 5
2.5. Sandbox Business Manager 5
2.6. Parallel judgment 6
3. Technical Specification 6
4. Requirements Evaluation Plan 6
5. Background Research and Reading list 7
6. Time-plan and Risk Plan 8
7. References 9
Abstract
1.1. Aim
Online judge system being the optimum online web application for online programming
competitions. With the increasing online programming competitions globally, there should
be a technical solution that nominates the competition winner in a fair and transparent
manner. The Online judge system would be the most used online software functionality for
determining a winner of the programming competition hosted with a database and security
features such as sandbox to mitigate hacking. The project aims to obtain a fair judgement
system by designing features for online instant judging abbreviated as "OJS". The software
aims at achieving an easier judgement matrix using a sandbox judge interface and the client-
side website interface. The sandbox design would have features of instantly compiling and
executing the tested scripts, producing assessment score and subsequent analysis report
with the programming winner (s). This software development project also aims at using
thread pools to realize parallel tests, and implement database optimisation techniques; for
instance parallel split tables.
1.2. Objective
To obtain the study aim, the key project objectives are as follows;
In the system, the assessment on test scripts are performed and an automatic
reports is issued with judgement results to determine a winner
ii. To design a web and server-side client using MVC procedure
The MVC procedure provides control, business logic, and service layers to support
system interface based on functionality being performed. In order to streamline
retrieval, the server side would offer a parallel table split to store the submitted
codes.
Since similar systems are exposed to hacking, Java offers a sandbox architecture design
to mitigate malicious coding and hacking during analysis and protect the system from
hacking (Coker et al., 2015).
2. Requirements
2.1. Input/output stream
Programming in Java input and output streams are used to handle software inputs and
outputs. The streams allow the program to consistently communicate with numerous
sources of data; for example, network connections and memory blocks. In the case of
project software, the streams can be used to execute test cases (O'Reilly, 2021). The
inputStream in the system would read the codes submitted, the outputStream would be
used to write the code to a destination. This will further be strengthened by split function to
eliminate concurrency issues. The input and output stream of a file stream of System.seIn ()
method can halt some threads from getting the input stream or possibly retrieve input
stream from other threads (O'Reilly, 2021). Obstructing some threads might interfere and
jeopardise the validity of the judgment process as well as the output stream. In a multi-
thread setup, when multiple test cases output the results to the same output steam
redundancy might occur hence impacting the validity and reliability of the judging output.
The system would need both the client-side interface and sandbox to listen to each other
based on the defined signals in the network. Therefore, the system will have a detailed
communication protocol for signal and winning rules. Also, a fundamental test process that
forms the sandbox specification and abstraction. Ideally, the signal communication
technique offers data needed for interaction across the two interfaces. Further, it forms the
base on which the sandbox is informed via signals such as if the client-side needs to ensure
the services being offered by the sandbox side. Also, type of function to achieve, as well as
the technique to send the information. The system will have main signals for judging
requests, get the sandbox status, and exit the sandbox to mention a few. For instance, if the
client-side sends requests from the end judge, the system will stock judge signals to the
required information Also, the sandbox-side gets the request, assesses it and interprets the
remaining information like the required data for the judgement procedures. Thereafter,
utilises the data as the source code in order to compile, execute and finally summarise the
operation output, and return the request result to the client-side interface.
2.3. Message box technique
Given that interaction between client-side and sandbox via network connection might be
slow, there is need to use asynchronous mechanism to the client-side when waiting for the
sandbox side to respond to the result. Also, if the thread sends judgment requests to the
sandbox and inspects the request the communication selected might halt the order of the
request array and return output with errors or possibly using a lot of time. Therefore, the
message box technique can eliminate the interference and enhance data efficacy during the
interaction. Each sandbox data contains a unique message identifier ID that helps to return
back the sandbox message using the unique ID. As such the system would obtain accurate
information verified with the unique message ID.
The Sandbox connecting manager will maintain the status of each sandbox to obtain
optimum load balancing between the sandbox and the client-side interface. The connecting
manager will also maintain the queues of the sandbox and judging requests. Since the
requests are being received in bulk the manager will use the FITO (First in First out)
procedure to sort out the queue and finish the task. Also, to ensure efficiency, the queue
will be protected and keep each sandbox inside the queue to make sure that the
subsequent sandbox completes the assignment based on the sorted order. Java sandbox is
supported by default in Java Security Manager (Coker et al., 2015).
2.5. Sandbox Business Manager
The requirement will be exerted to handle sandboxes that get and update the information
of the cache of the sandbox existing condition in a systematic way. The sandbox business
manager streamlines fairness in the buffer layers on the client-server interface. The sandbox
business manager will ensure that each sandbox condition is cached in the memory to
improve general system performance (Liang et al., 2017).
Java code contains a single static main method after compilation, and during judgement, the
judging application calls the main method to get the output of the software via the
reflection technique of the Java program. The program should consist of several test cases
on which each test case is also autonomous of the others. The thread of the judging
program is integrated with a dynamic cached thread pool of Java codes. Besides, each
dynamic cached thread can be executed on its own and minus any meddling and deadlocks.
As such, the parallel judgment can enhance efficiency in the system execution. Likewise, the
cached thread pool of the system would call back and release the memory in order to
streamline memory functions when the thread is not being used for more than one minute.
3. Technical Specification
The OJS web application will provide specific technical functions, which comprise
programming quiz management, system user management, system admin panel. Also, offer
functions such as linking programming competition and examining test scores and display
the score of each candidate in the competition. To obtain the technical functions listed, the
judging web application will comprise five fundamental modules, consisting of quiz module,
competition module, system user module, messaging module as well as the software
module. All the module tests of programs in coding contests, recruiters can conduct hiring
challenges and for intra-inter student coding competitions.
Software evaluation entails inspecting the entire web application to ensure it functions
based on the system, user, and design requirement; it is an essential process in software
development (Knodel & Naab, 2016). This project evaluation will be undertaken by system
developer, software designer, and security and business analysts. The software designer and
developer will inspect system requirement and functionality based on deliverables to
evaluate obtained results based on expected and achieved functions in the web application.
The software engineer and system developer will perform unit testing to ensure the codes
used are executing as expected. The unit test will ensure that the program errors and bugs
and if even a debug will be undertaken to guarantee that the final software runs without
errors (Langer, Hunt & Thomas, 2015). System testing on the other hand will be undertaken
to confirm that all the requirement specifications both functional and non-functional
usability requirements are achieved based on user and system specifications. Both unit and
system testing will be guided by whitebox testing (Homes, 2013; Nidhra & Dondeti, 2012).
The whitebox test will entail a situation where the tester understands system functions,
internal architecture, design and implementation of all the system components being tested
(Homes, 2013). As such, testable codes specific to the software application will be used to
guide the whitebox test (Barr, 2018).
For this literature search inclusion and exclusion criteria will be used. Research articles and
books written in English and from reputable book and journal publishers will be included.
Articles published 2012. Table 1 overleaf shows literature search keyword and database
used.
Table 1: Literature Search.
Database EBSCO, Wiley Online, Springer, ProQuest
2011 to present
Keywords: 18 articles
Java Sandboxing 3 books
2 reviews
Design and development of online judging 3 articles
system
A detailed timetable and plan for achieving the objectives of the project is presented in
Table 2 below
Table 2: Time-plan
Target date Plan Date completed
3 the march 2021 Choose a topic 5 march 2021
Topic: Online judge system for programming
competitions
10th march 2021 Gather information 20th march 2021
25the march Organise ideas 27 march 2021
2021
1st April 2021 2nd April
Review of related literature
10th April 2021 Create project design and implementation, performing 25th April 2021
project evaluation
What am I missing?
What do I want to change?
1st May 2021 Edit and addressing revisions 30th May 2021
1st June 2020 Submit final p June Paper 1ST June 2021
The research project expects no major risks that might affect the study. However, few ones
such as unforeseeable illness and public holidays might delay the submission based on the
initial due dates.
7. References
Barr, A. (2018). Secure Programming: Writing Testable Code. New Hampshire: Skillsoft
Ireland Limited
Coker, Z., Maass, M., Ding, T., Le Goues, C. and Sunshine, J., 2015, December. Evaluating
the flexibility of the Java sandbox. In Proceedings of the 31st Annual Computer
Security Applications Conference (pp. 1-10).
Homès, B., 2013. Fundamentals of software testing. London: John Wiley & Sons.
Knodel, J., & Naab, M. (2016). Pragmatic Evaluation of Software Architectures. Cham:
Springer International Publishing: Imprint: Springer https://doi.org/10.1007/978-3-
319-34177-4.
Nidhra, S. and Dondeti, J., 2012. Black box and white box testing techniques-a literature
review. International Journal of Embedded Systems and Applications (IJESA), 2(2),
pp.29-50.
Langr, J., Hunt, A., & Thomas, D. (2015). Pragmatic Unit Testing in Java 8 with JUnit.
Raleigh, Pragmatic Programmers.
Liang, H., Chen, C., Zhong, X. and Chen, Y., 2017, June. Design and implementation of online
automatic judging system. In IOP Conference Series: Earth and Environmental
Science (Vol. 69, No. 1, p. 012091). IOP Publishing.