Skip to content
/ mdoj Public

Mingdao OnlineJudge, A performant contest management system base on cutting edge stack.

Notifications You must be signed in to change notification settings

mdcpp/mdoj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

afd084f · Sep 22, 2024
Sep 8, 2024
Sep 6, 2024
Sep 18, 2024
Sep 5, 2024
Sep 6, 2024
Sep 10, 2024
Sep 18, 2024
Sep 6, 2024
Jun 2, 2024
Aug 31, 2024
Aug 2, 2024
Jul 22, 2024
Jan 28, 2024
Sep 10, 2024
Sep 3, 2024
Sep 6, 2024
Sep 6, 2024
Jul 17, 2024
Jan 28, 2024

Repository files navigation

MDOJ

wakatime cargo check cargo test Deploy docs to GitHub Pages

Performance-oriented contest management system for IOI like contest

Important

🚧 work in progress, please wait until first release

Highlights

  • 🪶Lightweight: Only 50MB for the binary(plugin is very large)
  • ⚡Lighting fast: Using Rust+Grpc-Web and correct implementation/algorithm
  • 🚀Easy to use: By using docker compose, you can setup the system in minutes
  • ⏱️Accurate: Directly use cgroupv2(no docker in judger), Report time deviation to frontend
  • 🔒Secure: Using nsjail to sandbox user submitted code

Features

Tip

Because we use grpc-web(server-side stream), HTTP2 is recommended, otherwise users won't be able to see realtime submit update(it's still very usable)

  • 🐳Scalable: When deployed in cluster, you can scale the system to satisfy reasonable request.
  • 🗄️Extensible: You can add any programing language by placing a *.lang file in plugins folder
  • 🔭 Powerful metrics/tracing using Open-Telemetry

Quick Start

Copy docker/quickstart file to your server and run docker compose up -d, then open https://localhost in your browser.

login as admin@admin and start play arounds.

Full Setup(Docker)

  1. Copy docker/production from source code to your folder
  2. run migration by running docker compose up migration
  3. generate config for judger by starting the judger once, and edit config
  4. generate config for backend by starting the backend once
  5. download and extract plugin(language support) of your choice to ./plugins

If you prefer to use default config, you can skip step 3 and 4.

See wiki for more details.

Setup for development

  1. install following package:
  • From system package manager: protobuf-devel, gcc
  • From rustup: rustup, cargo, just
  • From their website: docker, docker-compose

Then start reading documents in subfolder of your interest.

you may need to run just prepare in judger, backend subfolder.

Configuration

Tip

Set CONFIG_PATH to change the path to config file, default value is config.toml

See wiki for more detail

Development

MDOJ contain three service:

  1. Frontend: Render first time html, serve wasm.
  2. Backend: Serve both frontend and web client(chrome...)
  3. judger: run user-submitted code and return resource usage(and output)

Tip

See DEV.md to understand how to get started.

See /backend/README.md, judger/README.md, frontend/README.md for more detail.