Can google app engine be used as socket server?

My web host has rules against socket servers, so I'm looking at GAE.

Does anyone know of a socket server that can successfully work in GAE? I use it for flash, so nothing like smartfox would be surprising if possible.

Thanks.

+6
google-app-engine flash sockets multiplayer
source share
4 answers

Google App Engine now has a channel API

The channel API creates a permanent connection between your application and Google’s servers, which allows your application to send messages to JavaScript clients in real time without using a poll. This is useful for applications designed to immediately update users about new information. Some examples of use include collaborative applications, multiplayer games, or chat rooms. In general, using the Channel API is a better choice than polling in situations where updates cannot be predicted or written by a script, for example, when transmitting information between user users or events that are not systematically generated. - taken from the link below

http://code.google.com/appengine/docs/python/channel/overview.html

Update: October 27, 2016

Channel API is deprecated and scheduled to be abandoned on October 31, 2017

https://cloud.google.com/appengine/docs/deprecations/channel

Alternative products

You can use the Firebase Realtime database to achieve superior real-time in your application. Firebase is a more robust and customizable solution than the API channels, and it allows communication with a wider range of clients. It currently supports Android, iOS, and apps, as well as web browser apps.

+7
source share

Sockets are not supported in GAE. More supported / not supported here:

http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?pli=1

+6
source share

I can confirm that I have a multiplayer game using canvas / GWT / App Engine up and down using api channels. I use memcache to store the current state and send reports to clients on the server with their current state, then the server will send the new state to all clients if a certain time has passed (so that it does not send often if you have a large number of users). This approach seems to take up a bunch of processor power, however, at the moment, my approach is to have a minimal logic level on the server, which means there are many openings for hackers, etc. Multiuser interaction requires some work, but I have players moving within about half a second delay on other clients, also because they are not shown the last known position directly, im interpolating between the old position and the last known one. If anyone has a better approach on how to do this in the Google App Engine instead of using memcache, please let me know.

+5
source share

The socket is now supported with 1.7.2 by signing a trusted tester

http://googleappengine.blogspot.com/2012/09/app-engine-172-released.html

+3
source share

All Articles