My webhost has rules against socket servers so I've been looking into GAE.
Does anyone know of a socket server that can successfully run on GAE? I'm using it for flash so anything like smartfox would be amazing if it's possible.
Thanks.
You can use WebSockets to create a persistent connection from a client (such as a mobile device or a computer) to an App Engine instance. The open connection allows two-way data exchange between the client and the server at any time, resulting in lower latency and better use of resources.
Google does not support WebSocket connections in Googlebot. This was first known, I think, back in May 2019, when Martin Splitt and Zoe Clifford presented at Google I/O.
App Engine is a fully managed, serverless platform for developing and hosting web applications at scale. You can choose from several popular languages, libraries, and frameworks to develop your apps, and then let App Engine take care of provisioning servers and scaling your app instances based on demand.
Google App Engine has Channel API now
The Channel API creates a persistent connection between your application and Google servers, allowing your application to send messages to JavaScript clients in real time without the use of polling. This is useful for applications designed to update users about new information immediately. Some example use-cases include collaborative applications, multi-player games, or chat rooms. In general, using the Channel API is a better choice than polling in situations where updates can't be predicted or scripted, such as when relaying information between human users or from events not generated systematically. - taken from the link below
http://code.google.com/appengine/docs/python/channel/overview.html
Channels API has been deprecated and scheduled to be turned down by 31st October, 2017
https://cloud.google.com/appengine/docs/deprecations/channel
Alternative products
You can use the Firebase Realtime Database to achieve superior realtime functionality in your application. Firebase is a more robust and customizable solution than the Channels API, and it allows communication with a broader set of clients. It currently supports Android, iOS, and apps, and web browser apps.
Sockets are not supported on GAE. More supported/not supported infp here:
http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?pli=1
I can confirm that i have a multiplayer game using canvas/GWT/App Engine up and running using the channels api. Im using the memcache to hold the current state and have the clients report in to the server with their current state, the server will then broadcast the new state to all clients if a certain time has passed ( to keep it from sending to often if you have a high number of users ). This approach seems to take up a bunch of cpu power however, currently my approach is to have a bare minimum of logic on the server, wich means there are a lot of openings for hacks etc.. The multiplayer interaction needs some work but i have players moving within aprox a half of a seconds delay on other clients, thats also because im not showing the last known posiiton directly, im interpolating between the old position and the last known. If anyone has a better approach on how to do it on google app engine instead of using the memcache please let me know.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With