FST Graduate Research Topic


Research Topic: Java Online Judge Service
Suggested By: Maiga Chang
Last Update: March 19th, 2025

===============================
This research topic can be used in project-route and thesis-route. 
===============================

Online Judge (http://uva.onlinejudge.org/) as known as Online Judge System, it is a system which we can use to test if programs are well-designed to solve specific problems automatically. Online judge systems are always used in programming contest, e.g. ACM-ICPC (ACM International Collegiate Programming Contest). There are a lot of open source online judge systems around the world, most of them support more than one language, e.g. C++ and Java. Although many online judge systems are open source solution and we can obtain it very easily, these systems are too complicate and provide too many functions (for us) to integrate/put/connect it into/with our in-house customized systems.

This project's objective is to develop a lightweight (less functions, but need to have the following 'required' functions) online judge module for standalone testing Java programs and easily being used in other systems, i.e. the connection between the Client and the Server side is loose and the Server side provides flexible, adjustable, and configurable connectors to allow other systems managing users and problems, getting the wanted problems; sending programs to the online judge; getting feedbacks from the online judge; and, retrieving and searching LOGs without using the Client side this project developed. The requirements of this project are:

1.Project Architecture:


 




  1. Server - has to use PHP and Apache on Ubuntu Server 22.04 (https://ubuntu.com/download/server). The server side programs should be PHP.



  2. Database - has to use MariaDB or mySQL.



  3. Client - has to allow users copying-and-pasting their Java programs to user interface on web browsers and submitting the programs to the Java online judge; needs to support at least the three common web browsers: Microsoft Edge, Mozilla Firefox, and Chrome. The client side user interface should use HTML and JavaScript.



  4. Communication - uses AJAX and JSON to initiate communication and pass data packages.



 




2.Users:
a.Administrator - who can add/update/delete users, get user list and users' statistical data (prefer also refer to LOG Database Design section below), add/update/delete/hide Java problems
b.User - who can sign in the system, submit his/her program solution of the given Java problem, review his/her programs' performances (the Java online judge's output, prefer also refer to LOG Database Design section below)


3.How to use the system (the flow):
a.Administratior
(1) After the administrator signed in, s/he can see three functions: user management, problem management, and log management.
(2) When s/he chooses 'user management,' s/he can
(a) add users (add on at a time and batch add, when s/he does batch add, s/he can input prefix and postfix for the username and decide how many users s/he wants to create)
(b) get the user list (incl. sort function)
(c) delete an user on the list
(d) update user's data by clicking the username on the list (including the user's password if the user asks for help in person AND email address it is necessary if the user account was batch created)
(3) When s/he chooses 'problem management,' s/he can
(a) add a new problem (problem category, problem description, sample inputs, sample outputs, test inputs, and test outputs), please make sure that the administrator can enter more than 256 words and special characters, e.g. single quotation mark and quotes, for the problem description. Please note that some problems may have only output(s) and some outputs may have multiple lines, e.g.
******
* *
* *
* *
* *
******
(b) get the problem list (incl. sort function)
(c) delete an existing problem on the list
(d) update an existing problem by clicking the item on the list
(e) hide/disable an existing problem so the system will not give the problem to the user temporary
(4) When s/he chooses 'log management,' s/he can get the details log data by clicking on specific log category (please refer to LOG Database Design section below)

b.User
(1) The user has to sign in the system first, s/he can create an account by herself/himself if s/he doesn't have an account yet; s/he can request and receive her/his password via the registered email address if s/he can't remember the password.
(2) Once the user signed on, s/he can choose to do four things: review his/her performance, solve a problem, continue pending program, and logout.
(3) When s/he chooses to 'solve a problem,' the system will randomly pick up a problem from the database and show the problem (incl. description, sample inputs, and sample outputs) on the web browser. The system will pick up those problems the user hasn't solved perfectly, i.e. no warning and no error report from the online judge.
(4) S/he can either write her/his program solution down on the textbox directly and save the draft for later use OR copy-and-paste a program solution (which s/he may develop it at elsewhere) and submit to the online judge, of course, s/he may still save it for later use. The system always keep only ONE pending program for a user but will LOG his/her previous pending programs (please refer to LOG Database Design section below).
(5) Once s/he submiited her/his program solution to the online judge, s/he may see the result if s/he clicks on the 'performance review' link. S/he can see how well/bad her/his programs (every programs s/he submitted) performed in solving specific problems (please refer to LOG Database Design section below).
(6) S/he can also work on her/his unfinished program by clicking 'pending program' link.

c.The Java Online Judge
(1) The Java Online Judge will be activate/wake-up when the user submitting her/his program.
(2) It will first compile the submitted program and LOG any result it observes during the compiling process (please refer to LOG Database Design section).
(3) It will then use sample inputs and sample outputs to test the submitted program, also, it will LOG everything (please refer to LOG Database Design section).
(4) It will use test inputs and test outputs to test the submitted program, and LOG the results.


4.LOG Database Design:
a.User Activity
(1) how many times s/he sign on
(2) how many different problems s/he taken
(3) how many different problems s/he tried to solved - taking a problem doesn't mean s/he can finish nor solve perfectly, s/he may give up by clicking on 'solve a problem' again without saving her/his solution or disregard what s/he has written and saved before, also s/he may submit a solution with flaws.
(4) problems s/he gave-up and the corresponding pending solutions if there is any
(5) how many different problems s/he solved (perfectly)
(6) solutions and its corresponding performances if there is any
(7) problems s/he taken/solved and its corresponding
(a) time spent (total minutes of time spent for trying PLUS minutes from the last time s/he took the problem to s/he solved the solution perfectly, as we know, the system will not give the user the problems s/he has solved perfectly)
(b) time spent for trying (minutes from s/he took the problem to s/he submitted the solution OR gave it up by taking another problem)
(c) how many times s/he tried the problems until s/he solved the problems perfectly
(8) how many problems in different problem categories s/he solved (perfectly)
(9) how many problems in different problem categories s/he tried (s/he submitted solutions no matter whether the solutions could perfectly solve the problems or not)
(10)how many problems in different problem categories s/he gave up (didn't submit solution but did write something)
(11)how many problems in different problem categories s/he gave up directly without second thought (didn't have pending solution for the problem)

b.Solution Performance
(1) which problem the solution wants to solve
(2) whom submitted the solution
(3) the version (a user may try to solve a problem many times due to s/he can't solve it perfectly and the system gives her/him the problem again randomly)
(4) how many warnings the solution has during compiling
(5) how many errors the solution has during compiling
(6) the details of compiling results
(7) how many errors when the online judge tests the solution with the sample inputs and outputs
(8) how many errors when the online judge tests the solution with the test inputs and outputs

c.Problems
(1) how many problems in different problem categories have been perfectly solved by users
(2) how many problems in different problem categories have been tried by users (users submitted solutions no matter whether the solutions could perfectly solve the problems or not)
(3) how many problems in different problem categories have the situation that users gave up (users didn't submit solution but did write something)
(4) how many problems in different problem categories have the situation that users gave up directly without second thought (users didn't have pending solution for the problem)
----------------
(5) how many times each problem has been perfectly solved by users
(6) how many times each problem has been tried by users (users submitted solutions no matter whether the solutions could perfectly solve the problems or not)
(7) how many times each problem has the situation that users gave up (users didn't submit solution but did write something)
(8) how many times each problem has the situation that users gave up directly without second thought (users didn't have pending solution for the problem)
----------------
(9) how much time users averagely spent on perfectly solving each problem
(10)how much time users averagely spent on tring each problem (users submitted solutions no matter whether the solutions could perfectly solve the problems or not)
(11)how much time users averagely spent on each problem before they gave up (users didn't submit solution but did write something)
(12)how much time users averagely spent on each problem before they gave up directly without second thought (users didn't have pending solution for the problem)
----------------
(13)the average amount of perfectly solve problems in different problem categories
(14)the average amount of tried problems in different problem categories (users submitted solutions no matter whether the solutions could perfectly solve the problems or not)
(15)the average amount of gave-up problems in different problem categories (users didn't submit solution but did write something)
(16)the average amount of directly gave-up problems in different problem categories (users didn't have pending solution for the problem)

5.no malicious code is allowed (sandbox)