Pac-Man NGINX PHP MongoDB Application


I've started working on a Kubernetes reference application for demonstration purposes. This reference application will continue to evolve to also work with cloud federation capabilities in Kubernetes. I will provide updates as the application evolves.

Pac-Man Game Architecture Brief Overview


The Pac-Man game is a slightly modified version of the open source Pac-Man game written in HTML5 with Javascript. You can get the modified Pac-Man game source code here. The modifications are particularly around the backend PHP API. The original game used SQLite3 as the storage backend for reading and writing high scores. This change replaces SQLite3 with MongoDB as the storage mechanism.


NGINX is used as the web server to host the Pac-Man game application. It is configured with PHP FPM support for the backend PHP API.


PHP FPM is used for the PHP API to receive read and write requests from clients and perform database operations. The PHP MongoDB driver extension contains the minimal API for core driver functionality. In addition, the PHP library for MongoDB provides the higher level APIs. Both are needed.


MongoDB is used as the backend database to store the Pac-Man game's high score user data.


For a detailed overview of the Kubernetes reference application and how to set it up yourself, see the README in the repository.

Have fun!


Comments powered by Disqus