Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

Wycers/ioj-server-v1

Repository files navigation

Server

Server for Infinity OJ

Technology Stack

  1. Web Framework: Gin
  2. Registry: Consul
  3. Codec: Protobuf
  4. Tracing & Metrics: Jaeger

Prerequisites

  1. Jaeger
  2. Consul
  3. Protobuf
  4. Wire

Development

  1. Run consul daemon: consul agent -dev
  2. Run jaeger daemon: jaeger-all-in-one
  3. Run postgres service.

for the database:

create type judge_status as enum ('Pending', 'PartiallyCorrect', 'WrongAnswer', 'Accepted', 'SystemError', 'JudgementFailed', 'CompilationError', 'FileError', 'RuntimeError', 'TimeLimitExceeded', 'MemoryLimitExceeded', 'OutputLimitExceeded', 'InvalidInteraction', 'ConfigurationError', 'Canceled');

add following rule to host file:

<ip to db, 127.0.0.1> db
<ip to jaeger, 127.0.0.1> jaeger-agent
<ip to consul, 127.0.0.1> consul
make build
make run

Production

Usage