The problem I am facing is to simulate a communication channel between two users of a website (for example, a gaming website), using exclusively the technologies mentioned in the title.
I recently developed an online chess site where an idea that was supposed to give users the opportunity to play live matches too, and not just long games where you would make a move, and then return in 1-15 days to find out, answered whether your adversary. And the way this game engine works involves sending asynchronous requests to the server, both to update information related to the game (in case you make a move), and to check that something has changed (if you expect the enemy to move )
To better explain this ... to the player whose move he (the browser, of course) sends an asynchronous call. request updated information about the game, exactly when it makes its move. Meanwhile, the adversary sends PERIODIC requests, βaskingβ if something has changed. If something changes, the roles switch after updating the board.
Timers are behind the functionality of the engine, so my question for you is this: how are you going to simulate a com channel between two players, trying not to put too much voltage on the server, but also having the game updated as quickly as possible to maintain a βliveβ feeling. This is most important in 1-minute games (one of the available categories). Because in this case, the requests NEED to go through VERY often (at least 1 second). But server responses may be delayed, there will be a lot of stress on the server when hundreds of games, etc. will be available at the same time, so you see my problem.
I look forward to hearing from you guys and picking up your brain if you have any good ideas :)
Hooray! Andrew
PS: If you want to try, the name is e-chess960.com
source share