jeudi 16 juillet 2015

Real time matchmaking system?

We are creating a web application where users will be able to compete with each other on video games. On front-end we will use AngularJS and Scala on back-end. Here is the 'workflow':

  1. User1 creates a table/room called "Game" for a 1v1 game and takes seat 1
  2. User2 joins the "Game" room on seat 2
  3. When User1 and User2 clicks "Ready" status, the game is starting and I am passing certain data to the database, after the game those users will manually enter the score of the game.

How can I check if user2 actually joined the room and is still there? I'd like to automatically remove the user from the table when he's no longer on that page, so other people can join. It's basically a match-making system however, the game will be separate from our service.

Thanks a lot for any advice.




Aucun commentaire:

Enregistrer un commentaire