MemJudge
Online Judge for Competitive Programming Contests. And Memes
P.S. If you have better name for this thing, please tell me ._____.
P.P.S. I will appreciate any advices as well
###Version###
0.0-a0
##Structure##
- Front End:
- JavaScript:
- Handle user actions
- Send requests
- Back end:
- Golang:
- Handles HTTP Requests from users:
- Looks up DB
- Adds new Solutions to Queue
- ...
- Python:
- Database:
- MongoDB:
* Users Info
* Solutions
* Testing Results
* Testing Queue
* Contests
##Database Structure##
###MongoDB Collections###
- users:
{
"_id": {
"_id": _id,
"login": ...,
"passwordHash": ...,
"lastSID": len 32 hex,
"lastSessionStart": date,
"lastSessionEnd": date,
"email": ...,
"firstName": ...,
"lastName": ...,
"address": ..., #and other (index, ...)
"solutions": [ids],
"contests": [ids],
... #TODO (Polygon auth info)
},
...
}
- contests:
{
"id": {
"owners": [Rights],
"authors": [user ids],
"registeredUsers": [user ids],
"problems": [ids],
"startDate": date,
"endDate": date,
"private": true/false,
"scoring": [len(problems), ranking system],
# TODO Ranking System
},
...
}
- problems:
{
"id": {
"owners": [Rights],
"authors": [user ids],
"name": ...,
"statement": ...,
"tests": [Tests],
"inputType": stdin/file name (if not interactive),
"outputType": stdout/file name (if not interactive),
"checker": checker file, # TODO specification
"type": standard/interactive,
"polygonId": ..., #TODO
},
...
}
- solutions:
{
"id": {
"owner": user id,
"problem": problem id,
"testingTesult": TestingResult,
"timestamp": date,
}
}
- testing_queue
####Utility Classes####
"Rights":
{
"owner": user id,
"read": true/false,
"write": true/false,
"setRights": true/false
}
"Test":
{
"problem": problem id,
"input": ...,
"inputShort": first 1024 symbols of input,
"output": ...,
"outputShort": first 1024 symbols of output,
"timeLimit": float (seconds),
"memoryLimit": bytes,
"timeElapsed": float,
"memoryUsed": bytes,
"reason": does not exist | reason of verdict
}
"TestingResult" :
{
"status": (Queued/Compiling/Compilation Error/Running/(OK|Accepted)/Time Limit Exceeded/Memory Limit Exceeded/Runtime Error/Wrong Answer/Security Violation/...)
"tests": [Test],
"invokerId": id,
}
##TODO##
What about...
- Move Testing Queue to another DB (like MemCached, Redis, etc.)
- Move main DB from MongoDB to MySQL, ...
- Decide which language to use for testing solutions (Python / Golang / C++ / Java)
- Add Polygon Integration
- Better daemon controller (control/control)