Hi, 1) You are right: storing in ds is required in your case
2) You could use the Google Login service: very secured and will take care of login persistence for you See http://code.google.com/appengine/docs/java/users/ 3) Channel API is done to meet you needs (even at very high rate of polling): see http://code.google.com/appengine/docs/java/channel/overview.html regards didier On Jan 17, 9:32 pm, Spk <william.rava...@googlemail.com> wrote: > Hi folks! > > I just got started with Google App engine (using Java) and it's great! > I'm trying to develop a backend for an asynchronous turn-based game > I'm working on in my spare time. My plan was to develop a REST-ish API > that my game client would consume & poll periodically for updates. You > can picture the game as a kind of chess game with only one multi- > purpose pawn for each player (their character). Each player takes a > turn to make his move (attack, defense, etc), until one of the > characters dies. Pretty basic. > > Now it's the first time I'm writing a backend on top of being a google > app engine newbie, so there are a few areas I'm still a bit uncertain > about. I would really appreciate if some of you knowledgeable folks > could spare a bit of your time to give some advices on how to best > design this server. I'm using Objectify and the basic javax.servlet > framework to receive and submit requests. > > Here are my questions: > 1) A game between two players can theoretically last days. From what I > understand, I should store each player's move in the datastore, > correct? My initial reflex was to just keep the game session data in > the memcache but then I read that it was not a correct use-case, as it > the oldest cached elements can be removed from the cache at any time > to make room for newer data in case it's running low on memory. Also, > I should not simply be storing this data in my "java > objects" (instance memory) as idle instances of my app can be killed > at any time by google app engine to free up resources, is that > correct? > 2) I'm going to need some way to identify individual users and save > persistent progress stats (level, experience, etc). I was thinking of > rolling a simple User class and prompt new players to create an > account with username & password. What is the best way of storing that > sensitive data (mp5 hash I suppose?). Also, how can I ensure that a > move request comes from the desired user? Do I need to use some kind > of secret key delivered to the user upon login and that would have to > be included in all subsequent requests? Do I just check the requester > IP? If so, how do you handle people behind corporate routers seen as a > single IP by the outside world? > 3) Is it ok to have the game client poll for game status update every > 5 seconds? Data sent back by the server would, for instance, include > the most recent move of the other player and manage player turn > assignment. > > Thanks, I'll probably have more questions later! :) -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.