App simulates and visualize Dining philosophers problem and uses different algorithms to resolve deadlock. Backend is built using ASP.NET Core Web API and frontend is an Angular SPA.
Technologies used:
- ASP .Net Core Web API
- Angular
- Redis
- WebSocket
- Docker
To start with single API server follow these steps:
- Install or make sure Docker is running locally (e.g., check
docker version
). - Run
docker-compose up -d
- Go to http://localhost
To start with multiple API servers and load balancer run docker-compose up -d --scale dp_webapi=3
.
- Make sure you have .NET Core SDK 2.1 installed (
dotnet --version
) - Make sure you have Node.JS installed (
node -v
) - Build and run backend:
dotnet run --project ".\DiningPhilosophers.WebApi\DiningPhilosophers.WebApi.csproj"
- Build and run frontend (in folder 'DiningPhilosophers.WebClient'):
npm i
ng serve
- Go to http://localhost:4200
- DiningPhilosophers - interactive console application to simulate and run single selected algorithm and provide statistics
- DiningPhilosophers.Core - dining philosophers domain model library
- DiningPhilosophers.Sim - simulation model, services and abstractions library
- DiningPhilosophers.Utils - shared utilities library
- DiningPhilosophers.WebApi - Web API server application
- DiningPhilosophers.WebClient - Web client application