数据集是随数据目录发布的只读文件,运行期不会变,没有跨进程共享的必要。 原先塞 Redis 的写法每次命中都要把整份 json(最大的分类 pickle 后 323KB) 拉过网络再反序列化,比直接读本地盘还慢,而且和 session 挤在同一个 db=1。 改后首次读盘 4.3ms、之后每次 0.10us。签名、异常、返回结构都没动,缺文件 照旧抛 ValueError 被 HitokotoAPI 兜住;全部 12 个分类加载后每 worker 常驻 约 6.6MB,没做字段裁剪——那会改变旧接口的响应结构,而这里是回滚路径。 破例动了冻结的上一代:改动限于内部实现,外部可观测行为逐一对齐不变。 理由和边界写进了 OJ2/CLAUDE.md。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
OnlineJudge 2.0
An onlinejudge system based on Python and Vue. Demo
Overview
- Based on Docker; One-click deployment
- Separated backend and frontend; Modular programming; Micro service
- ACM/OI rule support; realtime/non-realtime rank support
- Amazing charting and visualization
- Template-problem support
- More reasonable permission control
- Multi-language support:
C,C++,Java,Python2,Python3 - Markdown & MathJax support
- Contest participants IP limit(CIDR)
Main modules are available below:
- Backend(Django): https://github.com/QingdaoU/OnlineJudge
- Frontend(Vue): https://github.com/QingdaoU/OnlineJudgeFE
- Judger Sandbox(Seccomp): https://github.com/QingdaoU/Judger
- JudgeServer(A wrapper for Judger): https://github.com/QingdaoU/JudgeServer
Installation
Follow me: https://github.com/QingdaoU/OnlineJudgeDeploy/tree/2.0
Documents
Screenshots
Frontend:
You can control the menu and chart status in rankings.
Admin:
Browser Support
Modern browsers(chrome, firefox) and Internet Explorer 10+.
Thanks
- I'd appreciate a star if you find this helpful.
- Thanks to everyone that contributes to this project.
- Special thanks to heb1c, who has given us a lot of suggestions.
License
Description












