Skip to content

lukaszdobosz/JAlgoArena-Submissions

 
 

Repository files navigation

JAlgoArena Submissions Build Status codecov GitHub release

JAlgoArena Submissions is service dedicated for collecting users submissions and exposing that data together with calculating ranking for all submissions as well as for problem based rankings. Querying submissions and submitting it has to be secure operation - methods require passing token which is then checked with Auth service.

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

Introduction

  • JAlgoArena Submissions consists two parts, CRUD operations for Submissions and exposing two calculated rankings - all submissions ranking and problem rankings

Component Diagram

REST API

Endpoint Description
GET /ranking Get general ranking list
GET /ranking/:problemId Get ranking for particular problem
GET /submissions Get all submissions list (only for ADMIN)
PUT /submissions Put new submission (only for logged in user)
DELETE /submissions/:submissionsId Delete submission by submission id (only for ADMIN)
GET /submissions/:userId Get all user submissions (only for logged in user)
GET /submissions/solved-ratio Get all problems solved by users ratio

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: 5003

Running from binaries

  • go to releases page and download last app package (JAlgoArena-Submissions-[version_number].zip)
  • after unpacking it, go to folder and run ./run.sh (to make it runnable, invoke command chmod +x run.sh)
  • you can modify port and 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-Submissions 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=5003 -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 Submissions and Ranking Service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 99.8%
  • Shell 0.2%