加入vuepress文档介绍,待续

This commit is contained in:
Himit_ZH 2021-03-02 22:19:37 +08:00
parent 9031bd5a58
commit 1b10850be6
12 changed files with 218 additions and 2 deletions

View File

@ -0,0 +1,55 @@
module.exports = {
title: 'HOJ 文档',
description: 'HOJ 的开发与使用文档',
head: [
['link', { rel: 'icon', href: '/img/favicon.ico' }],
],
base: '/',
markdown: {
lineNumbers: true // 代码块显示行号
},
themeConfig: {
sidebarDepth: 5,
nav: [
{ text: 'Demo', link: '' },
{ text: 'Gitee首页', link: 'https://gitee.com/himitzh0730/hoj' },
{ text: '作者首页', link: 'https://www.hcode.top/' },
],
sidebar: [
{
title: '开始介绍',
collapsable: true,
children: [
'/introducition/',
'/introducition/about',
]
},
{
title: '部署文档',
collapsable: true,
children: [
'/deploy/'
]
},
{
title: '开发文档',
collapsable: true,
children: [
'/develop/'
]
},
{
title: '使用文档',
collapsable: true,
children: [
'/use/'
]
},
]
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

20
docs/docs/README.md Normal file
View File

@ -0,0 +1,20 @@
---
home: true
heroImage: /img/logo.png
heroText: HOJ
tagline: 基于分布式、前后端分离的高性能在线评测系统
actionText: 快速了解 →
actionLink: /introducition/
features:
- title: 分布式
details: 支持多台判题服务随时增减
- title: 高效化
details: 采用前后端分离,开发迅速,使用高性能可复用判题沙盒
- title: 定制化
details: 网站高度集中配置,支持定制化修改
- title: 安全化
details: 判题使用 cgroup 隔离用户程序,网站权限控制完善
- title: 多样化
details: 独有自身判题服务同时支持其它知名OJ题目的提交判题
footer: MIT Licensed | Copyright © 2021.03.02 Himit_ZH QQ群
---

View File

@ -0,0 +1,3 @@
# 环境配置
==部署文档待续...==

View File

@ -0,0 +1,3 @@
# 写在开始
==开发文档待续...==

View File

@ -0,0 +1,88 @@
# 前言
## 什么是HOJ
HOJ全称 Hcode Online Judge是基于前后端分离分布式架构的在线测评系统。
## 为什么要开发HOJ
因为这是Himit_ZH的毕业设计。
## HOJ的特点
- 适应:支持手机端,响应式布局
- 设计:界面简约大方
- 安全:判题使用 cgroup 隔离用户程序,杜绝卡评测;网站权限控制完善
- 扩展:支持分布式判题
- 简单:高度集中网站配置
- 功能支持ACM、OI题目及比赛
- 多样支持自身题目数据评测也支持其它知名OJHDU、Codeforces题目的爬取与提交
## 截图
> 首页页面
![hoj1](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj1.png)
> 题目列表页
![hoj2](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj2.png)
> 题目详情页
![hoj7](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj7.png)
> 比赛列表页
![hoj3](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj3.png)
> 比赛详情首页
![hoj4](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj4.png)
> 排行榜
![hoj9](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj9.png)
> 个人信息页
![hoj6](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj6.png)
> 个人设置页
![hoj8](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj8.png)
> 管理后台首页
![hoj5](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj5.png)
> 部分手机端显示
![hojmb1](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hojmb1.png)
![hojmb2](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hojmb2.png)

View File

@ -0,0 +1,26 @@
# 简介
## 技术选型
> 基于Springcloud 和Vue.js的前后端分离的分布式在线评测系统
> HOJ基本逻辑架构图
![image-20201030234527577](https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/hoj.png)
## 判题逻辑
1. 前端用户提交数据。
2. 后端数据服务DataBackup获取到数据先将提交数据初始化同时将该提交的状态变成等待中写入数据库。
3. 通过Redis的发布订阅者将该判题信息发送给对应的==等待判题频道订阅者==
4. 订阅者收到信息初始化传输数据使用springcloud alibaba通过nacos注册中心调用判题微服务。
5. 若是调用判题服务失败(没有空闲的判题服务器),则重新通过发布者将该提交信息发布到对应==等待判题频道==重回3。
6. 若是调用失败超过40次则将提交的状态修改为提交失败不再进行判题服务的调用。
7. 前端用户可看到提交变成提交失败可点击状态进行重新提交重回2重新提交不影响提交时间等数据
8. 判题微服务获取到提交数据:
- 若是远程调用则通过Redis的发布订者发布到对应的==远程判题等待提交频道==,对应==频道接收者==获取提交信息进行远程提交获取对应的提交ID再通过==远程判题等待结果频道===发布给对应频道接收者,该频道接收者接受到信息,进行结果获取,获取结果失败,则再次重复发布;获取成功,写回数据库。
- 若是自家题目提交则启用线程池多线程使用Http将对应测试点数据与代码提交给Go-Judge判题沙盒进行编译与评测最后获取各个评测点结果进行结果计算写回数据库。

3
docs/docs/use/README.md Normal file
View File

@ -0,0 +1,3 @@
# 简介
==使用文档待续...==

5
docs/package-lock.json generated Normal file
View File

@ -0,0 +1,5 @@
{
"name": "docs",
"version": "1.0.0",
"lockfileVersion": 1
}

13
docs/package.json Normal file
View File

@ -0,0 +1,13 @@
{
"name": "docs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"keywords": [],
"author": "Himit_ZH",
"license": "ISC"
}

View File

@ -111,7 +111,7 @@
:disabled="contestMenuDisabled"
>
<span slot="label"
><i class="fa fa-list" aria-hidden="true"></i>&nbsp;Problems</span
><i class="fa fa-list" aria-hidden="true"></i>&nbsp;Problem</span
>
<transition name="el-zoom-in-bottom">
<router-view
@ -149,7 +149,7 @@
>
<span slot="label"
><i class="fa fa-bullhorn" aria-hidden="true"></i
>&nbsp;Announcements</span
>&nbsp;Announcement</span
>
<transition name="el-zoom-in-bottom">
<router-view