Git Product home page Git Product logo

ojclient's Introduction

  该软件是判题机,所谓判题机就是根据用户提交的代码和测试数据来判定代码正确性的程序。 判题机一般用于程序设计语言的学习和考试系统,例如用于ACM竞赛的HUSTOJ就有一款用C语言编写的判题机。

  说明:master和r1的版本与Hustoj兼容,r2版本是为了对接新的微服务

  本软件的思路来源正是HUSTOJ,由于HUSTOJ的判题机代码使用C语言来编写,且组织比较凌乱 不利于二次开发。作者根据其思路用C++语言重写了判题机,由于考虑到判题机的特殊工作原理,该判题机使用 HTTP来与其他系统进行对接。在开发的过程中作者简化了其中的某些机制,即没有使用“内存盘”的方案,这样在 某种程度上会影响到性能,但既然考虑到分布式部署的方案,可以用多个判题机来解决性能问题。

  软件安装方式如下

1.该软件仅仅在ubuntu16.04(64)系统下编译并测试,在编译前请安装如下的C++库,即Boost和CPPREST(Casablanca)。

apt-get install libboost-dev libboost-system-dev libboost-filesystem-dev libcpprest2.8 libcpprest-dev

2.添加判题的用户,即ID为1536和名字为judge的用户

/usr/sbin/useradd -m -u 1536 judge

3.设置权限,即确保"judge"用户对"/home/judge/runx"(x为某个数字)有写权限

4.编译软件,软件使用cmake进行构建,编译完成后会生成"DAEMON"和"JUDGE"两个可执行程序,把这两个文件复制到"/usr/local/bin/"目录下,并测试下是否能判题。该文件内容参考doc/configuration/judge.conf.example。

判题程序用如下方式进行单独调试 JUDGE 1001 0 或 JUDGE 1001 0 debug 判题守护进程用如下方式进行运行或调试 DAEMON 或 DAEMON debug

其中1001为solution的编号,0为任务编号,即该任务在/home/judge/run0/的目录下运行

5.创建配置文件,即创建"/home/judge/etc/judge.conf"。"DAEMON"和"JUDGE"会使用这个配置文件来与外部系统进行通信。

说明:java版本为openjdk-8-jdk

ojclient's People

Contributors

heyuantao avatar

Stargazers

 avatar yeebing avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.