Skip to content

ValentinLorand/HA-RealtimeGame

Repository files navigation

HA-RealtimeGame

GitHub release (latest by date) GitHub repo size

A basic game made with constraints for distributed systems's course at ESIR :

  • Realtime client-server multiplayer
  • High Availability (SPOF elimination, redundancy, automatic failure detection & mitigation)
  • Basic graphical interface

One-click demonstration :

Open in Gitpod

  1. Wait for servers to start and page being displayed
  2. Navigate to the left side "Docker" section
  3. Stop the currently used container (deno-1, port 8080)
  4. Observe that websockets automatically migrate to other replicas and the game still works !

Engineering notes & doc : Notion

Requirements : Deno(1.15.1)

Launch the application (1 instance) in dev mode

cd HA-RealtimeGame
export $(cat .env | sed 's/#.*//g' | xargs)
deno run --allow-net --allow-read --allow-env --watch src/server.ts

Start a server instance

cd HA-RealtimeGame
docker build -t realtimegame:latest .
docker run -it -p 8000:8000 -p 8080:8080 --name=realtimegame realtimegame:latest

Start three servers instances

cd HA-RealtimeGame
docker-compose up --build

Run tests

cd HA-RealtimeGame
export $(cat .env | sed 's/#.*//g' | xargs)
deno test --allow-net --allow-env

Developed by Leo Rolland and Valentin Lorand.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published