.Net Core 2.2, Akka.net , Docker
This project aims to create shopping cart and inventory management application via using akka.net actors. Akka server is used as distributed command bus with multiple instance of actors.Shopping api reaches this actors by akka remote connection (address is configured in appsettings.json) For each adding product and purchase actions, warehouse actor checks daily warehouse product limit and product stock limit and if the limits are excess server will return exception
- .Net Core
- Akka.Net
- Xunit
- Fluent Assertions
- .Net Core >= 2.2
- Docker
To start the application in development mode, run:
dotnet build
cd src\ShoppingApi
dotnet run
Application will be served on route: http://localhost:5000
To start the application in docker container:
docker-compose up
Docker will spin up application, akka server will be running and also shopping api
To start the akka server in docker container:
docker-compose -f docker-compose-akka-server.yml up
Docker will spin up akka server and shopping api can run seperately
Swagger documentation will be available on route:
http://localhost:5000/swagger
To run tests:
dotnet test ./tests/ShoppingApi.AkkaServer.Tests/ShoppingApi.AkkaServer.Tests.csproj
- There is no storage layer. Akka is able to persist info but its not configure yet
- Return product details