I need to develop a game server that will run periodically (e.g., triggered by a CRON job every five minutes or hour as appropriate). Once started up, the server will access all of the current game state (fetched through REST from the game’s data servers (Stackmob, Parse or similar), do the processing of player actions, and then POST the results back to the data server. In other words, it will be doing a lot of HTTP requests, but does not itself necessarily need to be a web service.
I’ve been considering multiple ways of developing this.
- I do not feel for setting up a server myself, so I need to find a service to run this on that permits the workflow I would like.
- The game engine is Java, so something that works neatly with that.
- Will need to GET and POST data files, so access to static files would be needed.
Most of the services that exist which provide something similar to what I require are directed at web services – which generally means that one needs to jump through some hoops to get things to work.
- Google App Engine, for instance, would require that I implement this using backends (since the game server could potentially run for more than 60 seconds), and isn’t particularly happy with the idea of static files.
- Amazon EC2 would seem easier to develop on (again by building a web service frontend, of course), but there seems to be relatively poor support for CRON.
Generally speaking, it feels like I want to shoot some sparrows with a slingshot, but all the services are offering me cannons. Are there any alternative platforms/frameworks beyond the big two mentioned above that would be suitable for something like this?
You could try Heroku. They support Java. If you created a project that used a single worker dyno then the hosting would be free (see link).
The process would be running continuously, so you might want use a Timer for periodic execution. You could also use Quartz, but it might be overkill.
Edit:
Here’s some links that might help get started: