I would like to know whether a net server game for a game like packman can be held on google application engine easily? In terms of response speed. I want to set a server which can manage the game tables in which the games开发者_开发问答 will be held. Each table will have two players only.
I don't understand if I can upload a java applet to GAE and how I'm doing so.
Any other suggestions about other free servers which can be suitable for a real time action games?
Thanks
GAE supports only short-lived connections (about 30sec max). Which means you can not have a permanent connection open between your client and GAE server. This effectively prevents push notifications from server to client, which are needed in most gaming setups.
To alleviate this limitation, Google introduced Channel API which enables you to push messages from server to client. However you need to use their javascript library on the client side. You could write an applet which calls javascript to access this library but this could be a bit of a kludge.
All-in-all, due to this limitations, GAE could prove not to be the right fit for your needs.
Update:
There is another reason why GAE is not fit for real-time communication between users: a client request to GAE app can be served by any server that Google chooses. Two users communicating could be connected to two different servers, even in different data centers (maybe even on different continents). To pass data between them you'd need to store all messages to datastore (slow) or to memcache (unreliable and possibly slow because it would need to propagate between servers/datacenters).
- You can use permanent backend for fast responces and break through 30 response limitation. You manually can define instances of backends. If you set it to be permanent - it is always will be on. And you can use your own implementation of in memory cache for fast data storing. Not sure, but maybe performance of data store will be ok for you. If DataStore ok and you don't have requests that can take more than 30 seconds - use fronend with high performance settings.
- Yes you can upload applet. Just put it somewhere in war folder and make reference to it from your jsp/html
- Well, if you need java, free for startup your project - I don't know alternatives to GAE
精彩评论