Google use mechanism

  • I would like to know if it is easy to use a network server game for a game like packman in the Google App Engine? In terms of response speed. I want to install a server that can manage game tables in which games will be played. Each table will consist of only two players.

  • I do not understand if I can load a java applet into GAE and how I do it.

  • Any other suggestions about other free servers that might be suitable for real-time gaming?

thanks

+4
source share
2 answers
  • GAE only supports short-lived connections (about 30 seconds). This means that you cannot open a permanent connection between your client and the GAE server. This effectively prevents push notifications from server to client, which are necessary in most game settings.

  • To ease this limitation, Google has introduced the Channel API , which allows you to forward messages from the server to the client. However, you need to use your client side javascript library . You can write an applet that calls javascript to access this library, but it may be a little shredded.

All in all, due to these limitations, GAE may not be suitable for your needs.

Update:

There is another reason GAE is not suitable for real-time communication between users: a client request to the GAE application can be served by any server that Google chooses. Two users can connect to two different servers, even in different data centers (possibly even on different continents). In order to transfer data between them, you need to save all messages in the data warehouse (slow) or in memcache (unreliable and possibly slow, because it must be distributed between servers / data centers).

+3
source
  • You can use a persistent backend for quick responses and overcome the 30 response limit. You can manually define backend instances. If you set it constant, it will always be on. And you can use your own implementation in the memory cache to quickly store data. Not sure, but maybe data warehouse performance will be fine for you. If the DataStore is fine and you don’t have queries that can take more than 30 seconds, use fronend with high performance settings.
  • Yes, you can download the applet. Just put it somewhere in the war folder and make a link to it from your jsp / html
  • Well, if you need Java, free to run your project - I don't know an alternative to GAE
0
source

All Articles