GAE/GWT server side data inconsistent / not persisting between instances

26 views
Skip to first unread message

Richy

unread,
May 16, 2012, 10:40:59 AM5/16/12
to google-we...@googlegroups.com

I'm writing a game app on GAE with GWT/Java and am having a issues with server-side persistent data. Players are polling using RPC for active games and game states, all being stores on the server. Sometimes client polling fails to find game instances that I know should exist. This only happens when I deploy to google appspot, locally everything is fine.

I understand this could be to do with how appspot is a clouded service and that it can spawn and use a new instance of my servlet at any point, and the existing data is not persisting between instances.

Single games only last a minute or two and data will change rapidly, (multiple times a second) so what is the best way to ensure that RPC calls to different instances will use the same server-side data?

I have had a look at the DataStore API and it seems to be database like storage which i'm guessing will be way too slow for what I need. Also Memcache can be flushed at any point so that's not useful.

What am I missing here? Could someone tell if the datastore is the way to go or if there is another way, thanks.

(nb. cross posted here: http://stackoverflow.com/questions/10620315/gae-gwt-server-side-data-inconsistent-not-persisting-between-instances)

Joseph Lust

unread,
May 18, 2012, 1:28:38 PM5/18/12
to google-we...@googlegroups.com
Typically a caching service is used in this cases, so it does not matter what node the next request hits.



Sincerely,
Joseph

Wendel

unread,
May 20, 2012, 10:03:55 AM5/20/12
to google-we...@googlegroups.com
This belongs in the GAE group.

Use the gae backends and sign game instances to backend instances.

So a game requests come in via a servlet on a dynamic instance, then the request is forwarded to the back-end. In the back-end you can keep the game states in memory.


Op woensdag 16 mei 2012 16:40:59 UTC+2 schreef Richy het volgende:
Reply all
Reply to author
Forward
0 new messages