server

module
v0.0.0-...-226c3a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2020 License: AGPL-3.0

README

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL