I try to implement web server for simple turn based game in WebAPI 2.0 using REST architecture. Although the gameplay itselfs (as it's purely turn based) seems to be a good candidate for web-api based server communication I have some concerns about "game-search" functionallity. When user want to start game, the GET
request to "/api/gamesearch"
would be made (and wait for next player) - but HTTP
is stateless protocole so is it even possible to do that?
Another important thing (corellated with previous question) - I guess it's not possible to implement "game-over" functionallity when player (whose ture is atm) doesn't send any request (do not move) in some time period after HTTP response
was send by server (which assigned ture to player) ?
I have seen there is a possibility to send Protocole exchange
request for switching to WebSocket
but that raises another question - do WebSockets
need special web-server privileges (is pure mvc hosting enough?) - I have to keep costs low as much it is possible (that's personal project - I suspect I won't even earn penny on that).