Intro
In JAlgoArena we distinct two areas of data flow, one about creating user accounts, and then using that information for accessing platform, authorizing users or just to enhance rankings.
Second, the core one is about processing user submissions, judging them and then storing results. Again, those results together with user account data are used in ranking generation.
Action types
There is few different type of activities which defines underlying technology and approach, below all used are listed and explained.
Technology | Activities | Type |
---|---|---|
REST API | user:* queue:* ranking:* submission:* | synchronous |
Messaging | publish | asynchronous |
Persistence | store | synchronous |
User Account
Activity | Message flow |
---|---|
Sign up | 1 user:create 2 store:save,kind:user 3 publish:user |
Log in (credentials) | 4 user:load,auth:credentials 5 store:load,kind:user |
Log in (token) | 6 user:load,auth:token 5 store:load,kind:user |
Query Users | 7 user:list 8 store:list,kind:user |
Submissions
Activity | Message flow |
---|---|
Submit solution |
9 queue:submission 10 publish:submission,state:new 11 store:save,kind:submission
12 publish:submission,state:saved 13 judge:submission 14 publish:submission,state:result 11 store:save,kind:submission 15 publish:ranking |
Query ranking | 16 ranking:load 17 store:load,kind:ranking |
Query submissions | 18 submission:list 19 store:list,kind:submission |
Microservices
Microservice | Sends | Receives |
---|---|---|
UI | user:create user:load,auth:credentials user:load,auth:token user:list ranking:load queue:submission submission:list | publish:ranking publish:submission publish:user (WebSocket) |
Auth | publish:user store:save,kind:user store:list,kind:user store:load,kind:user | user:create user:load,auth:credentials user:load,auth:token user:list |
Queue | publish:submission,state:new | queue:submission |
Submissions | publish:submission,state:saved store:save,kind:submission store:list,kind:submission | publish:submission,state:new publish:submission,state:result |
Judge | publish:submission,state:result judge:submission | publish:submission,state:saved |
Ranking | publish:ranking | publish:submission,state:result get:ranking |
Events | publish:ranking publish:submission publish:user (WebSocket) | publish:ranking publish:submission publish:user (Messaging) |
User-Store | - | store:*,kind:user |