Creating a Scalable Matchmaking Service

Cleanup and Conclusion

Last but not least, hosts that time out and matches that end abruptly will leave invalid data in the datastore. This data is ignored, but will accumulate over time. A java servlet was created to be used with GAE’s cron service. You can let GAE know how often to call the cleanup servlet by creating a cron.xml in your WEB-INF folder.

A few entries are also needed in your web.xml file.

Things to be considered



This was just an example of how to use GAE to create a scalable matchmaking service. For production, many things can be improved for your specific project. Error handling and a real authentication scheme would be necessary before using this service in the real world. This shouldn’t be very difficult to implement and Cloud Endpoints provides a nice means of OAuth authentication, if your platform supports it.
The full source code and test html files are available here.

me

About Me

I’m a game developer who’s extremely passionate about video game development and games in general. I've worked in the industry for quite some time and I like to share things I’ve learned and anecdotes from the industry here on this website. I work as a Network Programmer, but I have a deep rooted interest in level design.

LinkedIn

Subscribe for your newsletter

Stay in touch and get updates whenever Quantum Rarity is updated.