The Online Judge System (OJS) is a web-based platform designed for solving competitive programming problems with ease and efficiency. OJS can be setup easily for personal use and also posseses robust scalability to serve large-scale usage scenarios.
- Language Support: Offers support for a wide range of programming languages, providing flexibility for users to solve problems in their preferred language.
- Customization: Easy setup process allows customization for personal or organizational use.
- Scalability: Built with scalability in mind, capable of handling a high volume of users and submissions effortlessly.
Docker or a Docker-compatible container runtime must be installed locally to run OJS process in local/distributed worker mode.
To install OJS, follow these steps:
- Clone the repository:
git clone https://github.com/maxuanquang/ojs.git
- Navigate to the project directory:
cd idm
- Build project:
make build
- Start all necessary services:
make docker-compose-prod-up
- After all services have started up, we can start the project:
make run
By default, the HTTP server serves at http:localhost:8081
To run OJS as a standalone server:
ojs standalone-server
To start HTTP host server:
ojs http-server
To start a worker process for evaluating submissions:
ojs worker
Argument | Description | Default Value |
---|---|---|
--pull-image-at-startup |
Whether to pull Docker images necessary for compiling and executing test case at startup. If set to true and Docker fails to pull any of the provided image, the program will exit with non-zero error code. | true |
OJS use a YAML config file to configure its inner working in more details. By default, if no custom config file is provided, values in the config file configs/local.yaml are used.
OJS uses code generation for three purposes:
- Compile-Time Dependency Injection: Utilizes github.com/google/wire for efficient compile-time dependency injection, ensuring robust and maintainable code.
- gRPC Server, gRPC Gateway and OpenAPI Specifications Generation: Automatically generates gRPC server and grpc gateway server to seamlessly handle RPC requests and HTTP requests, automatically produce OpenAPI specifications to promote interoperability and ease of integration.
- JavaScript HTTP Client Generation: Employs OpenAPI Generator to generate a JavaScript HTTP client, streamlining communication with the server-side components.
To execute all code generation processes, simply run:
make generate