JAlgoArena Ranking is service dedicated for collecting accepted users submissions with best results and exposing that data together with calculating ranking for all problems as well as for particular problem.
- JAlgoArena Ranking is responsible for calculating ranking and exposing it via REST API
Endpoint | Description |
---|---|
[GET /ranking] | Get general ranking list |
[GET /ranking/:problemId] | Get ranking for particular problem |
[GET /solved-ratio] | Get all problems solved by users ratio |
Returns list of users sorted by their score for individual ranking
URL | Method |
---|---|
/ranking | GET |
-
Success Response:
Sorted list of users based on their score
- Code: 200
Content:[{"hacker":"mikolaj19","score":78.0,"solvedProblems":["sum-lists","string-rotation","2-sum","word-ladder"],"region":"Kraków","team":"Team B"},{"hacker":"mikolaj16,...},...]
- Code: 200
-
Sample Call:
curl http://localhost:5006/ranking
Returns list of users sorted by their score for problem ranking
URL | Method |
---|---|
/ranking/problem/:problemId | GET |
-
Success Response:
Sorted list of users based on their score
- Code: 200
Content:[{"hacker":"julia73","score":11.0,"elapsedTime":0.008186},{"hacker":"madzia70","score":10.0,",...},...]
- Code: 200
-
Sample Call:
curl http://localhost:5006/ranking/problem/fib
Returns stats of amount of users solutions per problem
URL | Method |
---|---|
/solved-ratio | GET |
-
Success Response:
Solved problems ratio
- Code: 200
Content:[{"problemId":"2-sum","solutionsCount":12},{"problemId":"fib","solutionsCount":11},...]
- Code: 200
-
Sample Call:
curl http://localhost:5006/solved-ratio
There are two ways to run it - from sources or from binaries.
- go to releases page and download last app package (JAlgoArena-Ranking-[version_number].zip)
- after unpacking it, go to folder and run
./run.sh
(to make it runnable, invoke commandchmod +x run.sh
) - you can modify port in run.sh script, depending on your infrastructure settings. The script itself can be found in here: run.sh
- run
git clone https://github.com/spolnik/JAlgoArena-Ranking
to clone locally the sources - now, you can build project with command
./gradlew clean stage
which will create runnable jar package with app sources. Next, runjava -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