Implementation of a distributed online multiplayer board game system for chess and tic-tac-toe. This project was done as a semester project for the course Distributed Systems of the ECE department of the Technical University of Crete. The detailed system specification can be found here.
Features:
- Friendly user interface
- User authentication and authorization.
- Real-time gameplay between 2 players using sockets.io.
- Support for user in-game chat.
- Real-time user matchmaking for entering a new game.
- Ability to continue an ongoing game.
- Support for tournaments where players can compete with one another.
- Display player statistics, past games, past tournaments, ELO rating.
Fault-tolerance:
- If one node of the MongoDB cluster dies, the system continues to operate normally.
- If the service that manages user plays dies (playmaster), the users are disconnected and are then immediately reconnected to a new playmaster.
The system was implemented as a Microservice architecture as shown in the image below. For more information about our approach, take a look at our project presentation.
Enough space for containers and at least 3GB of RAM
In order to run the project, just use docker compose:
docker-compose up
Then navigate to http://localhost
to access the user interface.
And then in order to shut the system down run:
docker-compose down
You can use username and password admin
for an administrator account.
There is a docker-compose
file with mounts to the local files that can be
used for development.
You can use it with:
docker-compose -f docker-compose-dev.yml up
docker-compose -f docker-compose-dev.yml down
In order to run in swarm mode, run:
docker swarm init
./swarm-start.sh
And then you can stop the system using:
./swarm-stop.sh
docker swarm leave