Skip to content

Commit c9861fa

Browse files
committed
more details
1 parent 30be5c6 commit c9861fa

File tree

2 files changed

+50
-3
lines changed

2 files changed

+50
-3
lines changed

docs/content/guides/overview.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,15 @@ The backend acts as a Restful JSON web server and is written in [Go](https://gol
9999
- It uses [Redis](https://redis.io/) as a light-weight key-value memory store.
100100
- [Docker](https://www.docker.com/) is used as a light-weight sandbox to run auto-tests of solutions to programming assignments in an isolated environment.
101101

102-
Part of the backend are **workers**, which are separate processes that handle the auto-testing of uploads. These worker *can* be distributed across multiple machines. We recommend using one worker process for 100 students. The workers can be added or removed at any time.
103-
104102
Each exercise task can be linked to a docker-image and a zip file containing the test code to support testing. See the Administrator Guide for more details.
105103

104+
## Workers
105+
106+
Part of the backend are **workers**, which are separate processes that handle the auto-testing of uploads. These worker *can* be distributed across multiple machines.
107+
We recommend using one worker process for 100 students. The workers can be added or removed at any time. Infomark uses AMPQ as a message broker. Each submission will be held in a queue and each worker will execute one job concurrently to avoid too much system load. Our recommendation is one worker per available CPU core.
108+
109+
The used amount of memory per submission can be configured. Memory-swapping is deactivated.
110+
106111
## Console
107112

108113
To avoid manual interaction with the database InfoMark provides a console to run several commands like enrolling a student into a course/group, set the role of a user.
@@ -141,4 +146,12 @@ using [Swagger](https://swagger.io/).
141146

142147
# Development
143148

144-
This system was developed in the [computer graphics groups](https://uni-tuebingen.de/en/faculties/faculty-of-science/departments/computer-science/lehrstuehle/computergrafik/computer-graphics/) of the University of Tübingen because there are no comparable systems that meet our requirements.
149+
This system was developed in the [computer graphics groups](https://uni-tuebingen.de/en/faculties/faculty-of-science/departments/computer-science/lehrstuehle/computergrafik/computer-graphics/) of the University of Tübingen because there are no comparable systems that meet our requirements.
150+
151+
# Requirements
152+
153+
InfoMark has the following minimal requirements:
154+
- one core for server `infomark serve` (1GB RAM)
155+
- one core for each backgound worker `infomark work` (depending on your docker-image size for the programming assignments)
156+
157+
You might want to sp

docs/content/guides/tutor.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ layout: subpage
77

88
# Unit - Tests
99

10+
Unit-tests consists of
11+
- a submission `<STUDENT_UPLOAD.ZIP>` made by a student
12+
- a testing framework `<TASK_SEPCIFIC_TEST.ZIP>` written by one of the tutors/instructors
13+
- a docker-image name `<YOUR_DOCKER_IMAGE>`
14+
15+
Each infomark-worker will fetch a submission from a queue and execute a command which is equal to
16+
17+
```bash
18+
docker run --rm -it --net="none" \
19+
-v <STUDENT_UPLOAD.ZIP>:/data/submission.zip:ro \
20+
-v <TASK_SEPCIFIC_TEST.ZIP>:/data/unittest.zip:ro \
21+
<YOUR_DOCKER_IMAGE>
22+
```
23+
24+
and capture the output which is store in the database and displayed the student resp. the tutor who grades the solution.
25+
26+
## Overview
27+
1028
There are some ways to ease the task of writing unit-tests.
1129
A clear directory structure and a Makefile to automatically pack all necessary archives or/and run the unit-test locally can dramatically speed up the entire process and avoid debugging steps on the server.
1230
The *makefile* should be able to clean temporary files, zip files and simulate the test result locally using the correct docker-image.
@@ -297,6 +315,22 @@ FAILED (failures=1)
297315
## C++
298316

299317
Testing in C++ is a bit tricky, doing reflections is difficult. A basic example is provided in out [git-repository](https://github.com/cgtuebingen/infomark/tree/master/unittests/cpp).
318+
The final directory structure *inside* the docker container will be
319+
320+
```
321+
/src
322+
lib/ # from the upload/student_template
323+
divide.cpp # from the upload/student_template
324+
divide.hpp # from the upload/student_template
325+
hello.cpp # from the upload/student_template
326+
hello_test.cpp # from the test
327+
catch.hpp # from the test
328+
CMakeLists.txt # from the test
329+
run.sh # from the test
330+
```
331+
332+
Any file from the testing-zip will override a file from the uploaded submission if such a file exists. Further, we automatically remove any "*.sh" from the submission file in our Docker-setup.
333+
300334
Any submission consists of a main file
301335

302336
```cpp

0 commit comments

Comments
 (0)