folley / JAlgoArena-Judge

JAlgoArena Judge Agent (supporting Kotlin and Java)

Home Page:https://jalgoarena-ui.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JAlgoArena Judge Agent Build Status codecov GitHub release

JAlgoArena Judge Agent is heart of JAlgoArena platform. It is responsible for generation of skeleton code as well as judging submissions based on requirements specified in problem definition.

Demo: https://jalgoarena-ui.herokuapp.com/

Introduction

  • JAlgoArena Judge Agent can be easily scalable - it's stateless and together with Eureka and API using Ribbon load balancer gives unlimited way to scale judgement capability
  • It supports Kotlin and Java
  • JAlgoArena Judge Agent is generating skeleton code for particular problem - based on meta data received from Problems Service
  • It judges correctness of the solution based on the pre-specified test cases as well as time and memory limits
  • It's using simple heuristic to calculate time and memory results - running in couple iteration and looking for best results makes the judgement itself more predictable and repeatable

Component Diagram

REST API

Endpoint Description
GET /problems Get problems list
GET /problems/:id Get problem by id
POST /problems/:id/submit Post problem solution to judge

Components

Continuous Delivery

  • initially, developer push his changes to GitHub
  • in next stage, GitHub notifies Travis CI about changes
  • Travis CI runs whole continuous integration flow, running compilation, tests and generating reports
  • coverage report is sent to Codecov
  • application is deployed into Heroku machine

Infrastructure

Running locally

There are two ways to run it - from sources or from binaries.

  • Default port: 8080

Running from binaries

  • go to releases page and download last app package (JAlgoArena-Judge-[version_number].zip)
  • after unpacking it, go to folder and run ./run.sh
  • you can modify port Eureka service url in run.sh script, depending on your infrastructure settings. The script itself can be found in here: run.sh

Running from sources

  • run git clone https://github.com/spolnik/JAlgoArena-Judge to clone locally the sources
  • now, you can build project with command ./gradlew clean bootRepackage which will create runnable jar package with app sources. Next, run java -Dserver.port=8080 -classpath "lib/*" -jar build/libs/jalgoarena-auth-*.jar which will start application
  • there is second way to run app with gradle. Instead of running above, you can just run ./gradlew clean bootRun

Notes

Component Diagram

About

JAlgoArena Judge Agent (supporting Kotlin and Java)

https://jalgoarena-ui.herokuapp.com

License:Apache License 2.0


Languages

Language:Kotlin 79.9%Language:Java 20.0%Language:Shell 0.1%