Loading...
I will REST and websocket API calls
POST/v1/matchmaker
{
"ELO_rating": {elo_rating}
"user_id": "frodo"
}
response
{
"status": "queued"
"queue_id": {queue_id}
}
Websocket is already open at time of app load
server pushes result via websocket
{
"status": "matched"
"opponent_id": "gandalf"
"game_id": {gameid}
"match_id": {matchid}
"myboardside": "black"
:oppboardside": "white"
"opp_elo_rating": {rating}
"gameid": {gameid}
"createdat": {unixtime}
}
user123 -> websocket connection
GET/v1/games/{gameid}
GET/v1/user/{userid}/games
Websocket connection at appload
WSS://url.ingameservice.com/ws
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.