Is a real-time multiplayer game using Google App Engine feasible? -
i developing real-time multiplayer game, , have been evaluating various cloud-based hosting solutions. unsure whether app engine fits needs, , grateful feedback.
in essence, want system work this: player calculates round n, , generates hash out of game state @ end of round. sends commands round, , hash, http post server. player b same thing, in parallel.
the server, while handling post player, first writes received hash code memcache. if hash other player not yet in memcache, waits , periodically checks memcache other players hash. both hashes in memcache, compares them equality. if equal, server sends commands of each player respectively other 1 http response.
a round should last around half second, meaning 2 requests per player per second.
of course, way of doing work if there @ least 2 instances of application running, 2 requests must dealt in parallel. also, memory cache must consistent on instances, reliable, , update immediately.
i cannot use xmpp because want game able run within restricted networks, has limited http on port 80.
is there way enforce 2 instances of app running? there glaringly obvious flaws in design? think architecture might work on app engine? if not, cloud based solution suggest?
i believe work. key api learn / test channel api. allow , forth communication between client , server.
the next issue worry memcache. in general, reliable, in strictest sense supposed assume memcached data disappear @ time.
if decide can't risk losing data that, need persist in datastore, means have experiment make sure can sustain 2 moves per turn. think possible, not trivially so. if had said 1 move every 3 seconds "no problem." multiple updates 1 entity per second start bump against practical limit on writes per second, if transactional.
having multiple instances running not problem - can pay keep instances warm if necessary.
Comments
Post a Comment