评测机
Go to file
2019-11-26 00:24:02 -08:00
client update design 2019-09-29 15:19:36 -07:00
data update documentation 2019-08-28 23:51:07 -07:00
file upgrade to go 1.13 2019-10-14 00:34:48 -07:00
judger update design 2019-09-29 15:19:36 -07:00
language add environment setting to language 2019-10-15 23:54:02 -07:00
pkg fix double close 2019-11-25 01:06:34 -08:00
problem fixed typo 2019-09-07 18:03:19 -07:00
runner decouple runner 2019-11-24 17:00:12 -08:00
taskqueue update design 2019-09-29 15:19:36 -07:00
types update design 2019-09-29 15:19:36 -07:00
.gitignore update documentation 2019-08-28 23:51:07 -07:00
go.mod decouple runner 2019-11-24 17:00:12 -08:00
go.sum decouple runner 2019-11-24 17:00:12 -08:00
LICENSE Initial commit 2019-08-24 15:32:38 -07:00
README.md update README 2019-11-26 00:24:02 -08:00

go-judge

Under designing.

The goal to to reimplement syzoj/judge-v3 in GO language using go-sandbox.

Planned Design

Container Root Filesystem:

  • necessary lib / exec / compiler / header readonly bind mounted from current file system: /lib /lib64 /bin /usr
  • work directory tmpfs mount: /w (work dir), /tmp (compiler temp files)
  • additional compiler scripts / exec readonly bind mounted: /c
  • additional header readonly bind mounted: /i

Brokers and interfaces:

  • client: receive pushed judge tasks from website (websocket / socket.io / RabbitMQ)
  • data: interface to download, cache, lock and access test data files from website by data_id
  • taskqueue: message queue to send run task and receive result (GO channel / (RabbitMQ, Redis))
  • file: general file interface (disk / memory)
  • language: programming language compile & execute configurations

Workers:

  • judger: execute judge logics (compile / standard / interactive / answer submit) and distribute as run task to queue
  • runner: receive run task and execute in sandbox (dumb runner)

Models:

  • JudgeTask: judge task pushed from website (type, source, data)
  • JudgeResult: judge task result send back to website
  • JudgeSetting: problem setting (from yaml) and JudgeCase
  • RunTask: run task parameters send to run_queue
  • RunResult: run task result sent back from queue

Utilities:

  • Config: read client config from TOML file
  • pkg/runner: run a group of programs in parallel

TODO

  • judge_v3 protocol socket.io client
  • syzoj problem yml parser
  • syzoj compile configuration
  • diff
  • interact problem support
  • answer submit problem support